Jul 20, 2008

Ie 6 Conditional Statement Problems - Wont Work

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

free web hosting

Ie 6 Conditional Statement Problems - Wont Work

BooZker
CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Home</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" type="text/css" href="style.css" />
    <!--[if IE 6]>
    <link rel="stylesheet" type="text/css" href="ie6style.css" />
    <![endif]-->
</head>


OK that's my code. I have been using IE conditionals for awhile and never had any problems. Now it wont work at all. I have tried so many different ways and nothing works. I would prefer it to be in the /css directory, but i dont know, it didn't work there so i tried the root.

you can view this file at http://oscargodson.com/dev/orca

FF and Safari it looks like it is supposed to (and i didn't design just slicing it for a client)

IE6 is having the issues and I just want to put a conditional in there and it will fix it all. The top shadow you see in FF and Safari should be gone in IE6 because i took it out to test it. So you can see if the shadow that shadow is gone.

 

 

 


Reply

chaosdesign
QUOTE(BooZker @ Oct 19 2007, 11:06 AM) *
CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Home</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" type="text/css" href="style.css" />
    <!--[if IE 6]>
    <link rel="stylesheet" type="text/css" href="ie6style.css" />
    <![endif]-->
</head>


OK that's my code. I have been using IE conditionals for awhile and never had any problems. Now it wont work at all. I have tried so many different ways and nothing works. I would prefer it to be in the /css directory, but i dont know, it didn't work there so i tried the root.

you can view this file at http://oscargodson.com/dev/orca

FF and Safari it looks like it is supposed to (and i didn't design just slicing it for a client)

IE6 is having the issues and I just want to put a conditional in there and it will fix it all. The top shadow you see in FF and Safari should be gone in IE6 because i took it out to test it. So you can see if the shadow that shadow is gone.

What you need is the condition before the normal style sheet

A basic form of this is the If-Then-Else statment

If (logic happenes ie Browser),

Then (use this style sheet)

Else (or if logic isn't true then use this style sheet)

The above just gives you an idea of how to approach the situation.

 

 

 


Reply

jlhaslip
Nope, he has it right.
Load the main css file first and then the IE css file only needs to contain the rules that should change if the Browser is an IE and meets the contitional. The Conditional can be used to select specific IE versions, too.

CODE
<!--[if IE 6]>
Special instructions for IE 6 here
<![endif]-->

From http://www.quirksmode.org/css/condcom.html

Looks good to me.

Check the file path? and remember that the references to images inside the css file should be referenced from the CSS file, not the HTML file.

*** edit ***

you are missing the style for the nav container in ie css file so the styling from the non-ie stylesheet is continuing to affect the NavContainer, which is likely the problem you are having.

Reply

mahirharoon
no problem with ie6 when checked

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : 6, conditional, statement, problems, work

  1. Website Problems Please Help
    Unwanted gap between the welcome bar and flash. (6)
  2. Help With Css/html Layout
    Horizontal List Problems (5)
    I can't figure out why this horizontal list isnt working. Underneath my banner is supposed to
    be a green gradient bar with a list of links in the center of the page. The links are all the way
    to the left and are really small. The banner is also overlapping the list for some reason. This is
    my current layout(don't worry, I'm not trying to advertise).
    http://www.stormgaming.net/stormcreations/ This is my CSS file
    http://www.stormgaming.net/stormcreations/storm.css Thanks in advance for any help.....
  3. Problems With Webpage Positioning In Internet Explorer
    (11)
    Originally this topic was asking for testing of my page in Internet explorer but someone on another
    forum got there first, but I still need help! I've made a page using absolute positioning
    and php, using percentages for positions so that it should suit all screen resolutions. However on
    internet explorer some of the text on the right can't be seen and is off the page, whereas in
    every other browser it's perfect. What can I do to make it show up properly in internet Explorer
    as well as all the other ones? Here's the link so you can see what I mean by....
  4. Website Deployment Problems
    (3)
    Hello, I have developed a website that is specific to IE. The website looks great on my local
    machine. I then move it to my production environment. For some reason, the website now looks
    different when I view it from the production server. The strange thing is... I am using the same
    browser. I always believed that HTML was downloaded to the client and then it was up to the browser
    to render it. Considering I am viewing the webpage using the same browser from my machine... I
    should have received the same thing. Which lead me to believe that I didn't upload it prop....
  5. Div Layout Problems
    table in div not shrinking (5)
    Hey everyone. I am having an issue on one of my pages where the table inside my middle section of my
    layout will not continue to shrink if the browser window is shrunk. AKA, i get a slider bar on the
    bottom instead of things just overlapping. Below is the code for the page along with my style sheet.
    If you want to see for yourself the problem just go here: Final Fantasy Fanatics - FF7 - Armor .
    Armor.php CODE <?php session_start();    include './../db_connect.php';  
     include './../member_class.php'; include './../news_class.php&....
  6. Shtml Page With Flash Loading Problems
    anyone have problems with shtml (1)
    Hey, I created this site http://www.markus252.com . Had to use .shtml extensions on the pages so I
    could have included, his server isn't php enabled and for some reason some people aren't
    seeing the two flash elements on the page. Not all computers are having this problem, just some. The
    page keeps saying that there 2 elements left to load(the two flash elements). I have no clue why? I
    had people download the lastest flash player and they all can see the files when i send them the
    direct link to them but the flash just won't load on the page. *Anyone else h....

    1. Looking for 6, conditional, statement, problems, work

Searching Video's for 6, conditional, statement, problems, work
advertisement



Ie 6 Conditional Statement Problems - Wont Work



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE