Solved

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

Posted on 2008-06-11
6
681 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

689 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