Solved

CSS on one style sheet for IE6, IE7, Safari and Firefox

Posted on 2008-06-11
6
679 Views
Last Modified: 2008-09-28
Hello everybody.  I am looking for a way to do my CSS in different browsers on one CSS.  How would I do this for Internet Explorer 6, Internet Explorer 7, Firefox and Safari?  I need this all to be done in the CSS on one page.  Thanks!
0
Comment
Question by:VBBRett
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 

Author Comment

by:VBBRett
ID: 21763889
Anybody know the answer to my question?  I need this to be in a css style sheet...thank you!
0
 
LVL 42

Expert Comment

by:David S.
ID: 21765241
That's a rather open ended question.

Some techniques are more cross-browser compatible than others. With experience you learn which are which.

However, sometimes there are issues, especially in IE, that you need a special rule for one browser or another to make it play ball. That's what CSS Filters are for. http://www.dynamicsitesolutions.com/css/filters/
0
 

Author Comment

by:VBBRett
ID: 21770445
OK, so I have a master page, and it has a link to a couple of CSS style sheets.  I do not want to link to those style sheets, i want to create a new list of rules for a new page that is linked to the current Master page.  How do I add CSS customized to a web page that is lnked to the Master.Master page?  I want to have CSS that is unique for that particular page.  Please help!
0
 
LVL 42

Expert Comment

by:David S.
ID: 21772985
You would need to ask someone who knows ASP.
0
 
LVL 49

Accepted Solution

by:
Roonaan earned 125 total points
ID: 21795455
You can use javascript to set a class on your body tag when it detects apple safari. then use

body.safari .someclass {color:red;}

The javascript looks like
<script type="text/javascript">
if(navigator.user_agent.indexOf('safari') > 0 || navigator.user_agent.indexOf('Safari') > 0) {
  document.body.className += " safari";
}
</script>
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question