Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > CSS Layout Issue in IE6 - Example in Book Fails

Reply
Thread Tools

CSS Layout Issue in IE6 - Example in Book Fails

 
 
Jim Carr
Guest
Posts: n/a
 
      12-14-2007
I'm learning CSS (and loving it), but an example in "Designing Without
Tables Using CSS" fails in IE6. It works as I expect and understand in
IE7 and Firefox 2. I have whittled down the example to just the basics.

http://www.chesapeaketempe.com/fixedwidth.html
http://www.chesapeaketempe.com/fixedwidth.css

In IE7 the yellow sidebar appears to the left of the green content
section. This is what I expect.

In IE6 it picks up the 200px left margin and therefore aligns with the
content section. This appears to me to be a bug. Perhaps someone can
explain to me what I'm missing or a workaround to the bug.

fixedwidth.css

body {
margin: 0;
padding: 0;
min-width: 740px;
background-color: black;

}
#wrapper {
text-align: left;
width: 740px;
margin-left: auto;
margin-right: auto;
background-color: blue;
padding: 10px;
}

#content {
background-color: green;
border: 1px solid #f0f0f0;
padding: 0;
}
#content .inner {
margin: 30px;
}


#content-wrapper {
margin: 0 0 0 200px;
}
#main {
position: relative;
}
#extras
{
position:absolute;
background-color:Yellow;
top: 0;
left: 0;
width: 180px;
border: 1px solid #f0f0f0;
}



fixedwidth.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Footbag Freaks</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="fixedwidth.css" />
</head>
<body>
<div id="wrapper">
<div id="header">
<p id="tagline">The Home of the Hack</p>
</div> <!-- header -->
<div id="main">
<div id="content-wrapper">
<div id="content">
<div class="inner">

</div>
</div> <!-- content -->
</div> <!-- content-wrapper -->
<div id="extras" >
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
officia deserunt mollit anim id est laborum.</p>
</div> <!-- extras -->
</div> <!-- main -->
</div> <!-- wrapper -->
</body>
</html>
 
Reply With Quote
 
 
 
 
Jim Carr
Guest
Posts: n/a
 
      12-14-2007
Jim Carr wrote:
> I'm learning CSS (and loving it), but an example in "Designing Without
> Tables Using CSS" fails in IE6. It works as I expect and understand in
> IE7 and Firefox 2. I have whittled down the example to just the basics.


Fixed this by using the HasLayout workaround within some of the parent
containers.
 
Reply With Quote
 
 
 
Reply

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS: a simple layout won't work in CSS liketofindoutwhy@gmail.com HTML 29 03-21-2008 03:46 PM
Css-Layout vs Table-Layout Habib HTML 15 06-20-2006 05:11 AM
Choosing Layout: Css-Layout or Table-Layout hpourfard@gmail.com ASP .Net 1 06-19-2006 10:06 AM
Table-based layout to CSS layout Guybrush Threepwood HTML 20 06-11-2006 11:12 AM
CSS Layout question - how to duplicate a table layout with CSS Eric ASP .Net 4 12-24-2004 04:54 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57