Conditional Comments not working in IE!?!?!?!!??
Posted: 20 March 2008 03:12 PM   [ Ignore ]
Newbie
Rank
Total Posts:  6
Joined  2008-03-20

I’m using the following bit of code inside of my page.  I have two columns of equal size floating inside of a div id=“main content”.  The two columns have fixed sizes so there should be a 20px “gutter” in the middle if floating them both left and right respectively.  Funny thing is that it was working for a sec, then I must have messed something up, cause it’s not working now.  I imagine it’s something simple I’m overlooking… I’m hoping a few more eyes are better than the two I’ve been using for the past hour or so.

<HTML>
<
HEAD>
<
TITLE>website</TITLE>
<
META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<
STYLE TYPE="text/css">
<!--

#header {
    
position:relative;
    
width:940px;
    
height:164px;
}

#sidebar {
    
position:relative;
    
floatleft;
    
width:200px;
    
height:1186px;
}

#main-content {
    
background-colorgreen;
    
position:relative;
    
padding20px;
    
float:right;
    
width:700px;
    <!--
[if IE]>width740px;<![endif]-->
    
height2000px;
}
     
#topsection {
          
position:relative;
          
width:700px;
          
height:255px;
          
margin-bottom20px;
     
}
      
     
#section-bar {
          
position:relative;
          
width:700px;
          
height:29px;
          
margin-bottom20px;
     
}
      
     
#content-column1 {
              
background-colorblue;
                 
position:relative;
                
clearboth;
                
floatleft;
          
width:340px;
          
height:755px;
     
}
      
     
#content-column2 {
               
background-colororange;
                
position:relative;
                
floatright;
          
width:340px;
          
height:755px;
     
}
         
         
#row {
         
margin-bottom20px;
         
}
         
         
#pic {
                 
background-colorgreen;
                 
floatleft;
                
width110px;
         
}
         
         
#description {
                 
background-colorred;
                 
floatright;
                
width210px;
         



#footer {
    
position:relative;
    
width:940px;
    
height:150px;
}

-->
</
STYLE>

</
HEAD>
<
BODY STYLE="background-color:#FFFFFF; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px;">
<
DIV ID="" align="center">
         
       <
DIV ID="header">
                   <
IMG SRC="images/header.gif" WIDTH=940 HEIGHT=164 ALT="">
       </
DIV>
         
         <
DIV ID="content" style="width: 940px;">
                 
              <
DIV ID="sidebar">
                    
                <
IMG SRC="images/sidebar.gif" WIDTH=200 HEIGHT=1186 ALT="">
          
                    </
DIV>
                    
          <
DIV ID="main-content">
                
                            <
DIV ID="topsection">
                       <
IMG SRC="images/topsection.gif" WIDTH=700 HEIGHT=255 ALT="">
              </
DIV>
              
              <
DIV ID="section-bar">
                       <
IMG SRC="images/section-bar.gif" WIDTH=700 HEIGHT=29 ALT="">
              </
DIV>
              
              <
DIV ID="content-column1"
                            </
DIV>
              
              <
DIV ID="content-column2"world
                            
</DIV>

          </
DIV>
                    
     </
DIV>
         
     <
DIV ID="footer">
          <
IMG SRC="images/footer.gif" WIDTH=940 HEIGHT=150 ALT="">
     </
DIV>
         
</
DIV>
</
BODY>
</
HTML

Any ideas?

Thanks

Profile
 
 
Posted: 28 March 2008 11:32 AM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  26
Joined  2008-03-05

Would like to see a link to the site in question?
Try this instead

#main-content {
    
background-colorgreen;
    
position:relative;
    
padding20px;
    
float:right;
    
width:700px;
    
height2000px;
}

html #main-content { width: 740px; } 

Also why do you have height @ 2000px;

Profile
 
 
Posted: 19 November 2009 09:34 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  1
Joined  2009-11-19

Would like to see a link to the site in question?
Try this instead
#main-content {
  background-color: green;
  position:relative;
  padding: 20px;
  float:right;
  width:700px;
  height: 2000px;
}

* html #main-content { width: 740px; }

Also why do you have height @ 2000px;

This is perfect. It really work well.
Thanks.

regards,
ivy

_______________
Simulation pret

Profile
 
 
Posted: 23 December 2009 07:54 AM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  7
Joined  2009-12-23

very nice…. just couldn’t understand some of it…. where do you put this>

</DIV>
     
    <DIV ID=“footer”>
      images/footer.gif ALT=
    </DIV>

Profile
 
 
Posted: 21 June 2010 07:31 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  3
Joined  2010-06-09

I was once having trouble with these codes, and I was digging “how to’s” from this site too. haha hows the site right now?

Profile
 
 
Posted: 21 July 2010 08:05 PM   [ Ignore ]   [ # 5 ]
Newbie
Rank
Total Posts:  4
Joined  2010-07-21

broken browsers, which try to provide CSS functionality but fail horribly in some manner; quirky browsers, which have generally decent CSS support but a number of “gotchas” where they don’t quite measure up; and compliant browsers, which do a good job of presenting CSS as it’s meant to be.SEO Company

Profile
 
 
Posted: 29 July 2010 10:36 AM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  1
Joined  2010-07-28

Hi,
I am quite new in CSS2.0 and don’t know how to include conditional CSS file. I want to add separate file for Internet Explorer and Firefox but don’t know how to do that
any body can guide me in that
thanks
Submit an Article

Profile
 
 
Posted: 18 November 2010 01:51 PM   [ Ignore ]   [ # 7 ]
Jr. Member
RankRank
Total Posts:  39
Joined  2010-10-06

Since conditional comments use the HTML comment structure, they can only be included in HTML files, and not in CSS files.

Profile
 
 
Posted: 23 December 2010 03:28 PM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  1
Joined  2010-12-23

Since conditional comments use the HTML comment structure, they can only be included in HTML files, and not in CSS files. I’d have preferred to put the special styles in the CSS file, but that’s impossible. You can also put an entire new <link> tag in the conditional comment referring to an extra style sheet.

Profile
 
 
Posted: 04 February 2011 02:26 PM   [ Ignore ]   [ # 9 ]
Newbie
Rank
Total Posts:  3
Joined  2011-02-04

I am quite new in CSS2.0 and don’t know how to include conditional CSS file. I want to add separate file for Internet Explorer and Firefox but don’t know how to do that. I was once having trouble with these codes, and I was digging “how to’s” from this site too.
______________________________________
Motor Generators

Profile
 
 
Posted: 11 February 2011 08:52 AM   [ Ignore ]   [ # 10 ]
Newbie
Rank
Total Posts:  3
Joined  2011-01-07

Thank you to share your point of view .How interesting and amazing your post is! It is useful and helpful for me that I like it very much,and I am looking forward to hearing from your next. !!! Replica Watches

Profile
 
 
Posted: 28 February 2011 12:53 PM   [ Ignore ]   [ # 11 ]
Newbie
Rank
Total Posts:  7
Joined  2011-02-28

thanks…works well for me

Profile
 
 
Posted: 06 March 2011 07:24 AM   [ Ignore ]   [ # 12 ]
Newbie
Rank
Total Posts:  1
Joined  2011-03-06

thanks a lot, helped me a lot, now I use in my projects, hugs!
peças - saúde - acompanhantes - bebidas

Profile