HighDots Forums  

problem displaying styles in design view

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss problem displaying styles in design view in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mcashatt
 
Posts: n/a

Default problem displaying styles in design view - 07-06-2004 , 03:54 PM






I have a site that uses js to browser sniff then link one of three external css
based upon the browser type.

The problem is that I cannot see the styles in design view (because the
stylesheet is linked via js).

Is there another way to see styles in design view without hard coding the css
(external,embedded or inline)?

If not then how are others sniffing the browser in order to apply styles?

Thanks for any feedback.


Reply With Quote
  #2  
Old   
darrel
 
Posts: n/a

Default Re: problem displaying styles in design view - 07-06-2004 , 04:16 PM






Quote:
If not then how are others sniffing the browser in order to apply styles?
Browser sniffing is usually a bad idea.

You're better off using some CSS hacks to show specific styles to one
browser vs. another. Which browsers are you trying to segment?

-Darrel




Reply With Quote
  #3  
Old   
mcashatt
 
Posts: n/a

Default Re: problem displaying styles in design view - 07-06-2004 , 06:38 PM



Thanks for the reply,

We are sniffing for:
Mac: IE5 & earlier, NS4 & earlier, AOL
Win: IE or NS

I agree that sniffing is a bad idea and would like to do away with it but we
are required to keep this code on our pages.

Do you know of any sites that provide info on the pros & cons of browser
sniffing and alternatives? Perhaps I can suggest a change in this requirment
if provide an argument to its use.

Thanks again.


Reply With Quote
  #4  
Old   
Alan
 
Posts: n/a

Default Re: problem displaying styles in design view - 07-06-2004 , 08:07 PM



on the original question-

assign a Design Time Stylesheet to the files.

check the help files.
Use the menu at top right of the CSS panel.
downside- can really only set this up one file at a time, as far as i know.


Reply With Quote
  #5  
Old   
darrel
 
Posts: n/a

Default Re: problem displaying styles in design view - 07-07-2004 , 10:52 AM



Quote:
Mac: IE5 & earlier, NS4 & earlier, AOL
IE5 has a set of CSS hacks that you can use for specific issues (google will
help on that). For NS4, use the @import hack to give NN4 a subset of the
main CSS.

Quote:
Win: IE or NS
There shouldn't be any reason to sniff these two. Design for Mozilla, and
add the necessary hacks for the IE issues.

A good place to start for this is here:

http://css-discuss.incutio.com/?page=CssHack

Quote:
I agree that sniffing is a bad idea and would like to do away with it but
we
are required to keep this code on our pages.
Who's requiring that?

Quote:
Do you know of any sites that provide info on the pros & cons of browser
sniffing and alternatives? Perhaps I can suggest a change in this
requirment
if provide an argument to its use.
The main argument is that browser sniffing is inaccurate and a huge
maintenance issue. It's inaccurate because it's hard to sniff for every
variation of browser out there. In addition, most modern browsers can 'fake'
themselves and be seen as something else to the sniffer. In terms of
maintenance, you need to constantly update the snifffer to accound for newer
browsers.

The biggest argument, though, is that there is no need to do this. CSS has
enough hacks built in to take care of the issue for you without needing to
rely on Javascript sniffing.

-Darrel




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.