Webmaster Forum

Sponsored Reviews   Keyword Research Tool   V7N Directory
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Reply
 
LinkBack Thread Tools Display Modes
Old 12-28-2007, 10:32 PM   #1 (permalink)
Junior Member
 
digitaloverlay's Avatar
 
Join Date: 12-14-07
Location: Virginia Beach
Posts: 21
iTrader: 0 / 0%
Latest Blog:
None

digitaloverlay is liked by many
Send a message via Yahoo to digitaloverlay
Question: How do I call specific CSS for ie?

As the title indicates, I am having some problems with ie (who isn't). I am creating a CSS layout and see that my layout isn't the same for FF and IE so I wanted to make one for IE to be called if the user is using that browser. After searching the web I found the hack to implement this but it isn't working.

This one is for greater than or equal to ie 6.

<!--[if gte IE 6]>
<link rel="stylesheet" type="text/css" href="iespecific.css" />
<![endif]-->

One for ie 6 only.

<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="iespecific.css" />
<![endif]-->

The others are similar. Here is the ref site: http://www.thesitewizard.com/css/excludecss.shtml

here is my test page (for now): http://www.digitaloverlay.com/rd/index2.htm

Thanks gang for helping me out.
digitaloverlay is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 12-29-2007, 01:03 AM   #2 (permalink)
Junior Member
 
digitaloverlay's Avatar
 
Join Date: 12-14-07
Location: Virginia Beach
Posts: 21
iTrader: 0 / 0%
Latest Blog:
None

digitaloverlay is liked by many
Send a message via Yahoo to digitaloverlay
Update: I have scoured the web and seem to be doing the code just as it should be but it just isn't working. It sucks that it is 3AM here and no on is one to read this, I could really use the sanity check.

I am able to get the results of the conditional comment but it is not calling the css file.
digitaloverlay is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-29-2007, 04:15 AM   #3 (permalink)
Contributing Member
 
megamoose's Avatar
 
Join Date: 06-04-06
Location: Northern Ireland
Posts: 452
iTrader: 0 / 0%
Latest Blog:
None

megamoose is just really nicemegamoose is just really nicemegamoose is just really nicemegamoose is just really nicemegamoose is just really nicemegamoose is just really nicemegamoose is just really nicemegamoose is just really nicemegamoose is just really nicemegamoose is just really nicemegamoose is just really nice
Send a message via MSN to megamoose
I read somewhere that IE7+ has stopped the specific CSS things from working (thanks Microsoft).

Because I know you used to be able to do something like *:HTML and only IE would pick it up, or something like that.

Hopefully someone can help you out, but in general IE sucks and I have just come up with the conclusion that if the majority of the site works, is attractive and readable except for one little padding pixel being out of place, then just forget about it. Take megamoose.net for an example, the top header looks horrible in IE but I couldn't give a hoot

Mark
__________________
Mark Wylde
MegaMoose Networks
http://www.megamoose.net
megamoose is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-29-2007, 04:18 PM   #4 (permalink)
Junior Member
 
digitaloverlay's Avatar
 
Join Date: 12-14-07
Location: Virginia Beach
Posts: 21
iTrader: 0 / 0%
Latest Blog:
None

digitaloverlay is liked by many
Send a message via Yahoo to digitaloverlay
Problem Solved

After reading the following websites, I converted my HTML to XHTML and ensured that my ref links were in the head section. Everything works well now with loading CSS files based on browser. If you have IE and FF (or other browsers like I do) then you may test my pages on your browsers. Keep in mind that the backgrounds may not be what I am going to use for the real site but wanted to make sure that they were different for the ie browser.

Research links for browser specific CSS files:
http://www.quirksmode.org/css/condcom.html
http://www.elated.com/articles/inter...onal-comments/

My test page:
http://www.digitaloverlay.com/rd/index2.htm

Thank you for reviewing.

Take care everyone.
digitaloverlay is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-19-2008, 09:25 PM   #5 (permalink)
Junior Member
 
danparks's Avatar
 
Join Date: 02-19-08
Posts: 12
iTrader: 0 / 0%
Latest Blog:
None

danparks is liked by many
you're on the right track...

Quote:
Originally Posted by digitaloverlay View Post
As the title indicates, I am having some problems with ie (who isn't). I am creating a CSS layout and see that my layout isn't the same for FF and IE so I wanted to make one for IE to be called if the user is using that browser. After searching the web I found the hack to implement this but it isn't working.

This one is for greater than or equal to ie 6.

<!--[if gte IE 6]>
<link rel="stylesheet" type="text/css" href="iespecific.css" />
<![endif]-->

One for ie 6 only.

<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="iespecific.css" />
<![endif]-->
Seems like you're doing it correctly. Make sure your order is correct, as in list a css file you always want first, then add additional files after. Each additional file includes *only* css overrides that pertain to the browser of interest. In the following example the first file (cssSiteAll.css, located in a directory named css) has all the css in it, and it works in non-IE browsers like FireFox. Then, the next file (cssSiteIEAll.css) holds only css that is needed to correct problems that occur when viewing your site in any IE browser. It doesn't copy the entire cssSiteAll.css file - it only holds the changes needed for IE to look good. Other, non-IE browsers will ignore this css. Next, if there is something that looks good in IE6 or less, but shows up bad in IE7, the third css file holds css for just those corrections.

<link href="css/cssSiteAll.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<link href="css/cssSiteIEAll.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE 7]>
<link href="css/cssSiteIE7.css" rel="stylesheet" type="text/css" />
<![endif]-->

Somewhat confusing, but try it out - it works.

Dan
__________________
MadBeeTech.com | Hosting | Website builder | Sell products | Sell digital downloads | Include a membership area
danparks is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick question - What do you call the type of internet CommandD Marketing Forum 8 10-03-2007 08:05 AM
When I have no specific question to ask...... Batch Forum Lobby 18 12-29-2006 01:00 PM
Directing specific users to a specific folder Kenny Fix Coding Forum 3 03-19-2006 08:57 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 12:18 PM.
© Copyright 2008 V7 Inc


Search Engine Optimization by vBSEO 3.1.0 ©2007, Crawlability, Inc.