How can I get this to work in IE too?

liunx

Guest
Hello.<br />
<br />
I hope you can help please.<br />
I have had to paste the code below as I don't have a site where I can put it - as it's on a LAN, apologies.<br />
<br />
Basically, this CSS works fine in all browsers except for IE and Mozilla.<br />
<br />
What I'm trying to achieve is that the border-left on the right blocks will always reach the "margin" div despite how much content it holds. As you can see, I've added lots of &nbsps's so purposely the main content is higher than what the right blocks contain, in Konqueror, Opera with the "spacer" div - the border-left of the right blocks reaches the bottom, but not IE.<br />
<br />
Any suggestions, or better ways of doing any of the code, and how to fix this is greatly appreciated.<br />
<br />
Purposely all colours etc have been removed to make it as simple on the actual layout as poss.<br />
<br />
Thanks.<br />
<br />
<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><br />
<br />
<html lang="en" dir="ltr"><br />
<head><br />
<title>test</title><br />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><br />
<style type="text/css"><br />
body, html {<br />
margin : 0;<br />
padding : 0;<br />
color : #000;<br />
}<br />
<br />
#head {<br />
text-align : left;<br />
}<br />
#head p {<br />
margin : 0;<br />
padding : 13px;<br />
color : #fff;<br />
}<br />
#nav {<br />
border-width: 1px 0px;<br />
border-color: #000;<br />
border-style: solid;<br />
text-align : left;<br />
}<br />
#nav p {<br />
margin: 0;<br />
}<br />
<br />
#area {<br />
width : 80%;<br />
float : left;<br />
}<br />
#content {<br />
margin : 0;<br />
padding : 15px;<br />
text-align : center;<br />
}<br />
<br />
#rightside {<br />
margin : 0 0 10px 80%;<br />
border-left : 1px dashed #000;<br />
}<br />
.right h4 {<br />
margin : 0;<br />
padding : 4px;<br />
border : 1px solid #000;<br />
color : #fff;<br />
}<br />
.rightbox {<br />
padding : 10px;<br />
border-top : 0;<br />
}<br />
.rightbox p {<br />
margin : 0;<br />
}<br />
.right {<br />
text-align : center;<br />
}<br />
<br />
#spacer {<br />
clear : both;<br />
height : 8px;<br />
font-size : 1pt;<br />
}<br />
#margin {<br />
margin : 0;<br />
padding : 0;<br />
clear : both;<br />
height : 10px;<br />
border-width: 1px 0px;<br />
border-color: #000;<br />
border-style: solid;<br />
}<br />
#bottom {<br />
clear : both;<br />
}<br />
#bottom p {<br />
margin : 0;<br />
padding : 6px;<br />
}<br />
</style><br />
</head><br />
<br />
<body><br />
<div id="head"><p>Title</p></div><br />
<br />
<div id="nav"><br />
<p>Some nav here</p><br />
</div><br />
<br />
<div id="area"><br />
<div id="content"><br />
<br />
<p>Content here.</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<br />
</div><br />
</div><br />
<br />
<div id="rightside"><br />
<div class="right"><br />
<h4>Block 1:</h4><br />
<br />
<div class="rightbox"><br />
<p>Content.</p><br />
</div><br />
</div><br />
<br />
<div class="right"><br />
<h4>Block 2:</h4><br />
<br />
<div class="rightbox"><br />
<p>Content.</p><br />
</div><br />
</div><br />
<br />
<div class="right"><br />
<h4>Block 3:</h4><br />
<br />
<div class="rightbox"><br />
<p>Content.</p><br />
</div><br />
</div><br />
<br />
<div class="right"><br />
<h4>Block 4:</h4><br />
<br />
<div class="rightbox"><br />
<p>Content.</p><br />
</div><br />
</div><br />
<br />
<div id="spacer"></div><br />
</div><br />
<br />
<div id="margin"></div><br />
<br />
<div id="bottom"><br />
<p>Text...</p><br />
</div><br />
</body><br />
</html><!--content-->Try putting in your CSS this:<br />
<br />
overflow: visable;<br />
<br />
where your having your problem with it hiding content<br />
<br />
alternatively try <br />
<br />
padding: 20px;<br />
<br />
for padding for all sides or you and also use one or more of these:<br />
<br />
padding-top: 20px;<br />
padding-right: 20px;<br />
padding-bottom: 20px;<br />
padding-left: 20px;<br />
<br />
you can change the 20px to the value that you want<br />
<br />
also does it work in tables instead of DIV tags (I do not know any thing about DIV)<!--content-->one other thing:<br />
<br />
with your CSS instead of having everything branching of body, use the specific tags it applies to eg<br />
<br />
div {<br />
<br />
#head {<br />
text-align : left;<br />
}<br />
#nav {<br />
border-width: 1px 0px;<br />
border-color: #000;<br />
border-style: solid;<br />
text-align : left;<br />
}<br />
<br />
<br />
also instead of having the classes and the ids in a random order, have the classes together and the ids together.<!--content-->Hiya.<br />
<br />
Tried the overflow, but still the same :\<br />
<br />
Any other ideas?<br />
<br />
Thanks for your reply and feedback, I've done this with the CSS now grouping it togethet etc.<br />
<br />
Thanks in advance.<br />
<br />
Regards,<!--content-->what version browsers are you using?<!--content-->I just noticed that you are using a percentage for margin width. I had a simalar problem with tables. I tried to make the picture show in a cell set for 100%. when you resize the window, the more you constrict the window the more of the picture that would get cut off. So when I changed the percentage to pixel amount it was fixed, although I did not get the centreing that I wanted.<br />
<br />
So question is: if you change the percentage to pixels on yours does it work then?<!--content-->
 
Back
Top