Reply
IE6 css layout issue
Old 04-11-2007, 06:10 AM IE6 css layout issue
Ultra Talker

Posts: 296
I wonder if anyone can help me?

I'm currently designing a site that hopefully will look like this,
http://www.tropicagraphicdesign.co.uk/rersnew23.jpg

My problem is the bottom of the curved white box, in IE7 and FF its fine, in IE it goes to far down.

Here is my code:

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>

<title></title>

<style type="text/css" title="layout" media="screen"> @import 

url("style.css"); </style>

</head>

<body>
<div id="container">
<div class="contentheader"></div>        

<div class="maincontainer">

<div><ul class="navbar">
<li><a href="#" class="nav">Home</a></li>
<li><a href="#" class="nav">About Us</a></li>
<li><a href="#" class="nav">Products</a></li>
<li><a href="#" class="nav">Contact</a></li>
</ul></div>

</div>

<div id="right">
</div>


<div class="content"></div>

</div>

<div class="bottom"></div>
<div class="footer">
</div>

</body>
</html>
and my CSS

HTML Code:
body {
font-family:Verdana, Arial, Helvetica, sans-serif;
background-color:#8c0304;
margin-left:auto;
margin-right:auto;
font-size:9pt;
color:#000;
line-height:10pt;
text-align:center;
padding:0;
}

#container {
width:720px;
height:527px;
background:url(images/mainbg.gif) repeat;
margin-right:auto;
margin-left:auto;
text-align:left;
}

.contentheader {
background:url(images/header.gif) no-repeat;
background-color:#ffffff;
width:727px;
height:149px;
margin-left:auto;
margin-right:auto;
color:#000;
}


.bottom {
background:url(images/bottom.gif) no-repeat;
width:720px;
height:59px;
margin-right:auto;
margin-left:auto;

}




.maincontainer {
width:718px;
margin:0px 0px 0px 7px;
background:#8c0304;
}





#nav {
background:url(images/redbg.gif) #fff repeat;
text-align:center;
margin-top:0px;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:8pt;
color:#000;
font-weight:700;
padding-top:0px;
padding-bottom:0px;
text-decoration:none;
}

#nav a {
background:#fff;
color:#000;
text-decoration:none;
}

#nav a:active {
background:#fff;
color:#CC2527;
}

#nav a:hover {
background:#fff;
color:#000;
font-size:8pt;
padding-bottom:2px;
border-bottom:dotted #CC2527;
}

.footer {
background:#8c0304;
width:320px;
margin-right:auto;
margin-left:auto;
color:#ffffff;
font-size:11px;
text-align:center;
}


.footer a,.footer a:active {
background:#8c0304;
color:#fff;
font-weight:700;
text-decoration:none;
}





ul.navbar {
list-style-type:none; float:left; display:block; width:714px; 

line-height:0.1em; 
clear:both; margin:0; padding:0; background-color:#000000;}

ul.navbar li {
display:inline;}

a.nav:link, a.nav:visited {
display:block; float:left; width:19.5%; padding:1.2em 1.2em 1.2em 

1.2em; margin:0; 
text-decoration:none; background-color:#000000; color:#FFFFFF;}

a.nav:hover {
display:block; float:left; width:19.5%; padding:1.2em 1.2em 1.2em 

1.2em; margin:0; 
text-decoration:none; background-color:#8c0304; color:#FFFFFF;}

a.nav:active {
display:block; float:left; width:19.5%; padding:1.2em 1.2em 1.2em 

1.2em; margin:0; 
text-decoration:none; background-color:#000000; color:#FFFFFF;}



#right

{
background:url(images/hand.jpg) no-repeat;
height:411px;
width:177px;
margin:0px 0px 0px 0px;
padding:0px;
float:right;

}

.content {
padding:15px 40px 2px 20px;
}
I really appreciate any help with this at all, thank you

Last edited by Tropica : 04-11-2007 at 06:13 AM.
Tropica is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 04-11-2007, 02:27 PM Re: IE6 css layout issue
LadynRed's Avatar
Super Moderator

Posts: 6,406
Location: Tennessee
One thing you need to do is CLEAR your floats:
http://css-discuss.incutio.com/?page=ClearingSpace


I modified your code slightly:
Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>

<title></title>

<style type="text/css" title="layout" media="screen">
@import url("style.css"); </style>

</head>

<body>
<div id="container">
<div class="contentheader"></div>

<div class="maincontainer">

<ul class="navbar">
<li><a href="#" class="nav">Home</a></li>
<li><a href="#" class="nav">About Us</a></li>
<li><a href="#" class="nav">Products</a></li>
<li><a href="#" class="nav">Contact</a></li>
</ul>


<div id="right">right</div>


<div class="content">
content

</div><!-- close content -->
<br class="brclear" /> /* clears float */
</div><!--close maincontainer -->


<div class="bottom">bottom</div>

<div class="footer">footer</div>
</div> <!-- close container -->

</body>
</html>
And the CSS:
Quote:
body {
font-family:Verdana, Arial, Helvetica, sans-serif;
background-color:#8c0304;
margin-left:auto;
margin-right:auto;
font-size:9pt;
color:#000;
line-height:10pt;
text-align:center;
padding:0;
}

#container {
width:720px;
height:527px;
background:url(images/mainbg.gif);
margin-right:auto;
margin-left:auto;
text-align:left;
position: relative;
}

.contentheader {
background:url(images/header.gif) no-repeat;
background-color:#ffffff;
width:727px;
height:149px;
margin: 0 auto;
color:#000;
}


.bottom {
background:url(images/bottom.gif) no-repeat;
width:720px;
height:59px;
margin: 0 auto;
}

.maincontainer {
width:718px;
margin:0px 0px 0px 7px;
background:#8c0304;


}





#nav {
background:url(images/redbg.gif) #fff repeat;
text-align:center;
margin-top:0px;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:8pt;
color:#000;
font-weight:700;
padding-top:0px;
padding-bottom:0px;
text-decoration:none;
}

#nav a {
background:#fff;
color:#000;
text-decoration:none;
}

#nav a:active {
background:#fff;
color:#CC2527;
}

#nav a:hover {
background:#fff;
color:#000;
font-size:8pt;
padding-bottom:2px;
border-bottom:dotted #CC2527;
}

.footer {
background:#8c0304;
width:320px;
margin-right:auto;
margin-left:auto;
color:#ffffff;
font-size:11px;
text-align:center;
}


.footer a,.footer a:active {
background:#8c0304;
color:#fff;
font-weight:700;
text-decoration:none;
}





ul.navbar {
list-style-type:none; float:left; display:block; width:714px;

line-height:0.1em;
clear:both; margin:0; padding:0; background-color:#000000;}

ul.navbar li {
display:inline;}

a.nav:link, a.nav:visited {
display:block; float:left; width:19.5%; padding:1.2em 1.2em 1.2em

1.2em; margin:0;
text-decoration:none; background-color:#000000; color:#FFFFFF;}

a.nav:hover {
display:block; float:left; width:19.5%; padding:1.2em 1.2em 1.2em

1.2em; margin:0;
text-decoration:none; background-color:#8c0304; color:#FFFFFF;}

a.nav:active {
display:block; float:left; width:19.5%; padding:1.2em 1.2em 1.2em

1.2em; margin:0;
text-decoration:none; background-color:#000000; color:#FFFFFF;}



#right

{
background:url(images/hand.jpg) no-repeat;
height:411px;
width:177px;
margin:0px 0px 0px 0px;
padding:0px;
float:right;

}

.content {
padding:15px 40px 2px 20px;
height: 350px;
border: 1px solid white;
}

.brclear { /* Use a break with this class to clear float containers on both sides */
clear:both;
height:0;
margin:0;
font-size: 1px;
line-height: 0;
}
This works in FF and IE
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club

Last edited by LadynRed : 04-11-2007 at 02:29 PM.
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 04-11-2007, 03:10 PM Re: IE6 css layout issue
Ultra Talker

Posts: 296
ah floats, thanks so much LadynRed you are a total legend!!!
Tropica is offline
Reply With Quote
View Public Profile
 
Old 04-11-2007, 06:11 PM Re: IE6 css layout issue
LadynRed's Avatar
Super Moderator

Posts: 6,406
Location: Tennessee
Awwww.. now... just happy to help
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to IE6 css layout issue
 

Thread Tools

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 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.12516 seconds with 13 queries