Solved

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

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
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.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

856 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