Different CSS depending on browser?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
RazorMedia

Different CSS depending on browser?

Post by RazorMedia »

My problem is that i´ve got a design that don´t support both IE and FF (with the rest). My sollution was to create two different CSS files depending on what browser you are using.

Can that be done in CMSMS?

(See www.hrproduktion.se. This version works fine in IE, but not FF or any other)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Different CSS depending on browser?

Post by Dr.CSS »

You could try this and then feed IE some diff. margins and padding with the IE hack, * html body #theonethatneedsit {what it needs}

The menu A's were pushed down in Ff so I moved some of the padding to the list A's.

#meny {
position: relative;
left: 20px;
top: 0px;
background-image: url(http://www.hrproduktion.se/grafik/meny/bg.gif);
background-repeat: no-repeat;
width: 706px;
        height:42px;  Firefox needed height
}

#meny ul {list-style:none;  it still thoght you had bullets
margin: 50px 0 0;
padding:6px 0px;
}

#meny li {
dislay: inline;
float: left;
}

#meny a {
font-size: 12px;
text-decoration: none;
color: #FFFFFF;
text-align: center;
vertical-algn: middle;
font-family: Arial, Helvetica, sans-serif;
heiht: 33px;
positon: relative;
padding-top: 9px;
padding-bottom: 11px;
disply: block;
padding-right: 8px;
padding-left: 8px;
margin:0px;
}

#meny #node15 a:hover, #meny #node15 a {
background-image: url(http://www.hrproduktion.se/grafik/meny/ ... _hover.gif);
background-repeat: no-repeat;
}

#meny a:hover, .currentpage {
background-image: url(http://www.hrproduktion.se/grafik/meny/bg_hover.gif);
background-repeat: repeat-x;
background-poition: left top;
}
RazorMedia

Re: Different CSS depending on browser?

Post by RazorMedia »

thanx mark
even though i didn´t get everything you said I got it working.

you are the man
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Different CSS depending on browser?

Post by Dr.CSS »

Well one of them  ;) Thanks.

I see it is working in IE also, good
Locked

Return to “Layout and Design (CSS & HTML)”