PDA

View Full Version : If statements for CSS


2bz2p
10-10-2008, 04:40 AM
Hello,

I am wondering what the code is to allow ie to see one specific set of css atributes while other browser see a different set of attributes. but for the same class, id ect...

Thanks
2b

edbr
10-10-2008, 05:13 AM
<!--[if IE 6]>
Special instructions for IE 6 here
<![endif]-->
for example stylesheet for ie only

2bz2p
10-10-2008, 12:08 PM
I could use this example and it would use the IE7 code for IE and the code outside for Firefox and the rest, correct?

Also how do I use IE6 and IE7 in the same if or do I have to write an if for each.

Thanks again for the quick reply
2b


<!--[if IE 7]>
#wrapper #book #name {
text-align : left;
margin-top : 162px;
margin-left : 148px;
font-family : Arial, Helvetica, sans-serif;
font-size : small;
<![endif]-->

#wrapper #book #name {
text-align : left;
margin-top : 150px;
margin-left : 131px;
font-family : Arial, Helvetica, sans-serif;
font-size : small;
}

Rob_Che
10-10-2008, 03:40 PM
You can just use [ if IE ] if you want all IE versions to be used... (I think)

domedia
10-10-2008, 05:12 PM
Some info here as well:
http://msdn.microsoft.com/en-us/library/ms537512.aspx

2bz2p
10-10-2008, 05:29 PM
You guys are awesome thank you
2b

2bz2p
10-16-2008, 02:24 PM
So I have been messing with the CSS, and I say to anyone who wants to CSS this mofo for a spot on the credits list let me know, unfortunately I am broke so I cant pay anyone.

I cant get it to do what I want in IE and FF without (not there yet but my thought is) writting multiple css pages for each browser.

start of the site.
http://vpilot.org/vpilot_2.0/skins/log_book/intro.template.php

** Going to bang head against wall **
Thank again
2b

Rob_Che
10-16-2008, 05:02 PM
What issues are you trying to overcome?
You may find that the way you've styled it can be changed to accomodate the browsers, rather than add an [IF]...

Collapsing top margins for example.

Some of the issues you are having (divs falling under others etc) are due to some simple, browser specific, problems that can be overcome.

2bz2p
10-16-2008, 05:22 PM
I dont know what I am tryng to do at this point, let me regroup and get a fresh cup of coffee.

I am trying to create all the pages of test and forms to be on the open book pages. I also have like 7 links that I wanted to be accessible so I was creating seperate pictures, now I realize that I can use one picture of the book and map the link sections. though I cant get the book centered now and when I use the z-index of -1 to be able to add the stuff on top of the book, it doesnt show the book in FF.

later on I will re-upload what I have messed with today and repost.

I am probably taking something very easy and turning it into a complicated mess.

Thanks again
2b

domedia
10-16-2008, 05:24 PM
now I realize that I can use one picture of the book and map the link sections.
Not sure this is a good approach.. you basically water your website down to just be one image.
when I use the z-index of -1 to be able to add the stuff on top of the book, it doesnt show the book in FF.
-1? Where did you get that from? :)

2bz2p
10-16-2008, 05:42 PM
See this is why i am banging my head against the wall lol

Not sure this is a good approach.. you basically water your website down to just be one image.

I am really unsure of which direction to go with this. weither to us it as a background div or what.

-1? Where did you get that from? :)
I think I got the z-index -1 from w3schools to make the book sit in the background. Then have the info divs sit on top of it.

I have tried multiple attemps at different setups I wrote the book in to the background but then to have the page links I had to add a different picture inwhich didnt sit in the right spot and if the other divs changed in size it move the image out of wack. Plus there is severe issue with placement of things between FF and IE.

Thanks
2b

2bz2p
10-19-2008, 02:01 AM
Im good I sat down and drank some coffee and starred at the monitor. then it hit me just "do it in divs and stop looking fot an easier way..."

Good to go now

vpilot.org/vpilot_2.0/skins/log_book/intro.template.php

then click open book and you will see the page I was fighting with.

any thoughts are apreciated.
once again thank you for all your help
2b