Click to See Complete Forum and Search --> : end if? using seperate styles for dif browsers


deweydesigns
04-07-2006, 01:37 AM
hello all,

alright i have 2 variations of a few of the same divs for ie and everything else. how do i keep them in the same stylesheet? can/how do i use the 'if ie' 'end if' thing? i've used seperate stylesheets before that were targeted by php.. the php also detected the browser.. i would like to avoid all that if at all possible and just use the .htm extention and not the .php extention..

.. also i need to be able to use the 'if ie' 'end if' thing in an external stylesheet and not in the header of the htm page..

Fang
04-07-2006, 02:19 AM
Parsing .html as .php:
Add to your .htaccess file
AddType application/x-httpd-php .htm .html
If it doesn't work add it to httpd.conf file

'if IE' thing:
Usually condtional comments (http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp) are used, which wont work in an external style sheet.
Detect browser server side and serve the appropriate css.

deweydesigns
04-07-2006, 02:37 AM
arghhh.. so i have to turn it into php then? no other way?

Fang
04-07-2006, 02:46 AM
No, a .html which is parsed by the server as .php

David Harrison
04-07-2006, 03:03 AM
Just use two stylesheets, the first one included as normal and the second is the IE-only one which you can <link> to in a conditional comment.

Of course, a better solution would be to use the same markup for both browsers, then write a stylesheet for all browsers, with perhaps some fixes for IE hither and thither.