Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 09-04-2007, 06:46 PM Problem with IE 6
Skilled Talker

Posts: 58
Trades: 0
Hi,

I'm having a problem with how my site looks in IE 6. It looks fine in Firefox and IE 7, but not in IE 6.

This is how it looks in IE 6: http://www.alphaberrydesign.com/images/alphaberryie.jpg

and this is how it should look: http://www.alphaberrydesign.com/images/alphaberryff.jpg

This is my CSS code:

Code:
/* CSS Document */

body  {background-color:#A1554B;
      font-family:Arial, Helvetica, sans-serif;
      color:#624318;
      font-size:12px;
      margin:0px;
      }
      
#page-container {width:790px;
                 margin:auto;
                 }

#header {margin:0px;
         }
         
#title-top {margin:0px;
              }
              
#contact-sidebara {width:175px;
                   float:left;
                   margin:0px 0px 0px 96px;
                   height:184px;
                   }
                   
#contact-sidebarb {width:175px;
                   float:right;
                   margin:0px 96px 0px 0px;
                   height:184px;
                   }                             
         
#contentcontainer-contact {background-image:url(images/berrymiddle.gif);
                           width:790px;
                           padding-top:20px;
                           }
                  
#content-contact {width:403px;
                  margin-right:175px;
                  padding-top:20px;
                  margin:0px 280px 0px 105px;
                  }          

#contentcontainer-faq {background-image:url(images/berrymiddle.gif); 
                       width:790px;
                       padding-top:20px;
                       height:735px;
                       margin:auto;
                       }
                       
#content-faq {width:450px;
              margin-right:122px;
              padding-top:20px;
              margin:0px 122px 0px 105px;
              }
              
#sidebar-faq {width:122px;
              float:right;
              margin:0px 96px 0px 0px;
              }                                     

#container-index {background-image:url(images/berrymiddle.gif); 
                  width:790px;
                  }
              
#content-index {width:455px;
                margin-right:112px;
                padding-top:20px;
                margin:0px 122px 0px 105px;
                }
                
#sidebar-index {width:112px;
                float:right;
                margin:0px 96px 0px 0px;
                }    


#container-portfolio {background-image:url(images/berrymiddle.gif); 
                      width:790px;
                      }    
                
#content-portfolio {width:570px;
                    padding-top:20px;
                    margin-right:110px;
                    margin-left:110px;
                    }
                    
#container-price {background-image:url(images/berrymiddle.gif); 
                  width:790px;        
                  }    
                  
#content-price {width:570px;
                padding-top:20px;
                margin-left:110px;
                }                                            
                
#container-sevices {background-image:url(images/berrymiddle.gif); 
                  width:790px;        
                  }    
                  
#content-services {width:450px;
                   margin-right:122px;
                   padding-top:20px;
                   margin:0px 122px 0px 105px;
                   }
                
#sidebar-services {width:122px;
                  float:right;
                  margin:0px 96px 0px 0px;
                  }                                                    
                
#services-sidea {width:130px;
                 float:left;
                 }

#services-sideb {width:130px;
                 float:right;
                 }        
                 
#servicea1 {width:450px;
            margin:0px 122px 0px 105px;
            }                                          
                
#servicesa2 {width:130px;
             margin:0px 0px 0px 110px;
             }
                
#footer {
         }                   

h1 {margin:0px;
    padding:0px;
    }
    
h2 {margin:0px;
    padding:0px;
    }    

h3 {margin:0px;
    padding:0px;
    font-weight:bold;
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    }

.centeralign {text-align:center;
              }



A:link{color:#DA8D83;text-decoration:none}
A:visited{color:#DA8D83;text-decoration:none}
A:active{color:#DA8D83;text-decoration:none}
A:hover{color:#000000;text-decoration:none}    


form {width:380px;
      margin:0px;
      padding:0px;
      margin:auto;
      font-family:Arial, Helvetica, sans-serif;
      color:#624318;
      }

form fieldset {border-color:#624318;
               border-width:1px;
               border-style:solid;
               padding-top:0px;
               padding-left:10px;
               padding-right:10px;
               padding-bottom:0px;
               margin:0px;
               }

textarea {overflow:auto;
          }
          
form label { 
    display: block;
    float: left; 
    width: 135px;
    margin: 5px 0 0 0;
    color:#624318;
}      

form legend {color:#624318;
             }

.padding-form {padding-top:10px;
               }
          
               
.sentpage {font-size:16px;
           color:#F3EBE2;
           text-align:center;
           font-weight:bold;
           font-weight:bolder;
           margin-top:40px;
           }
Any help, or links to good tutorials would be fantastic. Thank you!
lilycup is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-05-2007, 03:08 PM Re: Problem with IE 6
Skilled Talker

Posts: 58
Trades: 0
I have been able to fix the problem using two style sheets, one for IE 6 and then one for IE 7.

This is the code I am using:

Code:
<!--[if IE 6]>
<link rel="stylesheet" href="alphaberryoldie.css" type="text/css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="alphaberrystyle.css" type="text/css">
<![endif]--> 
<link rel="stylesheet" href="alphaberrystyle.css" type="text/css" />
Now it works perfectly in IE 6 when I remove what is bolded above ^, however, it doesn't work in Firefox when I remove that.

Does anyone know why this is happening? It's probably staring me right in the face, but I can't see it yet Thank you!
lilycup is offline
Reply With Quote
View Public Profile
 
Old 09-05-2007, 03:15 PM Re: Problem with IE 6
angele803's Avatar
Perfectly Imperfect

Posts: 1,772
Name: Stephanie
Location: Oklahoma
Trades: 2
I dont know much about conditional statements in regards to stylesheets, but it looks to me that if you remove that bold line, FF has no idea what stylesheet to use. Since your conditional statements are for IE, FF sees nothing.
__________________

Please login or register to view this content. Registration is FREE
angele803 is offline
Reply With Quote
View Public Profile
 
Old 09-05-2007, 03:23 PM Re: Problem with IE 6
Skilled Talker

Posts: 58
Trades: 0
Yes, you're very right. When I remove that line, FF doesn't know what to use.

Code:
<link href="alphaberrystyle.css" rel="stylesheet" type="text/css" media="screen" />
<!--[if IE 6]>
<link rel="stylesheet" href="alphaberryoldie.css" type="text/css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="alphaberrystyle.css" type="text/css">
<![endif]-->
Do you think a code like this would work?
lilycup is offline
Reply With Quote
View Public Profile
 
Old 09-05-2007, 03:32 PM Re: Problem with IE 6
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,935
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
It will work...except that you don't need the IE7 comment. The reason you don't need it is because it's already defined as your default stylesheet beforehand.

The key is order in this case. CSS will process in the order (top to bottom) in which you stack the stylesheets. So if you use conditional statements for stylesheets, put them after the default stylesheets.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 09-05-2007, 03:37 PM Re: Problem with IE 6
Skilled Talker

Posts: 58
Trades: 0
Wonderful, thank you! So could I set it up like this:

Code:
<link href="alphaberrystyle.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<link rel="stylesheet" href="alphaberryoldie.css" type="text/css">
<![endif]-->
It appears to work fine, but I like to double check
lilycup is offline
Reply With Quote
View Public Profile
 
Old 09-05-2007, 03:47 PM Re: Problem with IE 6
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,935
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Absolutely! Now you're on the trolley.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 09-05-2007, 03:48 PM Re: Problem with IE 6
Skilled Talker

Posts: 58
Trades: 0
Thank you!
lilycup is offline
Reply With Quote
View Public Profile
 
Old 09-05-2007, 03:55 PM Re: Problem with IE 6
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Firefox IGNORES conditional comments, only IE will 'see' them.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 09-06-2007, 03:23 AM Re: Problem with IE 6
maxxximus's Avatar
Extreme Talker

Posts: 219
Name: Rob
Location: UK
Trades: 0
I've had a quick look at your site and I think your sidebar-index div is suffering from the margin/float problem that bugged IE6. It effectively means it doubles the margin on the same side of the float so your other content gets shifted down.

You can fix it with display inline. Bin the IE6 conditional css

#sidebar-index {
width:112px;
float:right;
margin:0px 96px 0px 0px;
display: inline;
}
maxxximus is offline
Reply With Quote
View Public Profile
 
Old 09-06-2007, 04:27 PM Re: Problem with IE 6
Skilled Talker

Posts: 58
Trades: 0
That works perfectly too, thank you!
lilycup is offline
Reply With Quote
View Public Profile
 
Old 09-09-2007, 09:07 AM Re: Problem with IE 6
danfinney's Avatar
Average Talker

Posts: 22
Name: Dan Finney
Trades: 0
Maxxximus is correct. The dreaded IE6 margin doubling. I ususally end up with an IE6 only stylesheet that looks like this:

#thing_one, #thing_two, #thing_three, #thing_four {
display: inline;
}
__________________
d a n f i n n e y

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
danfinney is offline
Reply With Quote
View Public Profile Visit danfinney's homepage!
 
Reply     « Reply to Problem with IE 6
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.87144 seconds with 12 queries