clear:left problems

M

Malcolm Collett

On this page:
http://users.iafrica.com/m/mc/mcollett/SPS/Castle/Castle.htm
I am having some problems with clear:left.

Below the Gladiator Castle div is a <hr> with clear:left on it. What I would
like is that <hr> should clear the photo in the same div, but it is clearing
nav list as well. This results in a large blank space below the photo.
How do I get rid of this blank space?

(I tried floating the photos to the right and using clear:right on the <hr>,
but then the image of the main content div leaks to the left and fills the
space below the nav list.)

Malcolm
 
L

Lauri Raittila

In said:
On this page:
http://users.iafrica.com/m/mc/mcollett/SPS/Castle/Castle.htm
I am having some problems with clear:left.

Below the Gladiator Castle div is a <hr> with clear:left on it. What I would
like is that <hr> should clear the photo in the same div, but it is clearing
nav list as well. This results in a large blank space below the photo.
How do I get rid of this blank space?

Use absolute postioning for your navigation. It works just as well as
float, as you already use margin for content.
 
P

Paul Furman

Malcolm said:
On this page:
http://users.iafrica.com/m/mc/mcollett/SPS/Castle/Castle.htm
I am having some problems with clear:left.

Below the Gladiator Castle div is a <hr> with clear:left on it. What I would
like is that <hr> should clear the photo in the same div, but it is clearing
nav list as well. This results in a large blank space below the photo.
How do I get rid of this blank space?

(I tried floating the photos to the right and using clear:right on the <hr>,
but then the image of the main content div leaks to the left and fills the
space below the nav list.)

Strange: in IE6 if I scroll down then back up a gap revealing the
background image apprears. Before that I can see a slight diff in width
of the foreground color where the menu cuts into it. It works as you
wish in mozilla.
 
M

Malcolm Collett

Lauri Raittila said:
Use absolute postioning for your navigation. It works just as well as
float, as you already use margin for content.

Thanks Lauri

I ended up making just one small change.
I replaced
#NavLeft {float:left; ...}
with
#NavLeft {position:absolute; left:0; ...}
I haven't specified top, right or bottom, as they should default to auto.

Is this useage of position:absolute correct? Works great in IE!

Malcom
 
A

altamir

I ended up making just one small change.
I replaced
#NavLeft {float:left; ...}
with
#NavLeft {position:absolute; left:0; ...}
I haven't specified top, right or bottom, as they should default to auto.

Is this useage of position:absolute correct? Works great in IE!

Many people use absolute positioning. Floating is badly supported,
specially in IE.
One more thing: remove background-image declaration from #NavLeft, because
you've got it already in the 'body' element. Make it transparent.
 
M

Malcolm Collett

One more thing: remove background-image declaration from #NavLeft, because
you've got it already in the 'body' element. Make it transparent.

Thanks, will do.
Malcolm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top