Solved

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

Posted on 2008-06-11
6
671 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
  • 2
  • 2
6 Comments
 

Author Comment

by:VBBRett
Comment Utility
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.
Comment Utility
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
Comment Utility
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.
Comment Utility
You would need to ask someone who knows ASP.
0
 
LVL 49

Accepted Solution

by:
Roonaan earned 125 total points
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
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 tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now