[WEB4LIB] Re: Page validation question

Chris Gray cpgray at library.uwaterloo.ca
Mon Apr 8 14:03:52 EDT 2002


Well, the end of one div and the start of another automatically creates a
break between the two.

I presume you want to control the distance between the bottom of one block
and the start of the next.  That looks like a job for CSS (bottom margin
or top margin properties).

<br /> is more for creating a new line within a block (like say, poetry).  
The ugly way (not in the true spirit of XHTML Strict) is <div><br
/></div>, but then you're using semantic mark up where presentation mark
up (CSS) should be used.

Chris Gray
Library Systems
University of Waterloo


On Mon, 8 Apr 2002, Robert Sullivan wrote:

> >The actual cause is an inline element directly within the body
> >element.  In strict XHTML the content model for body only allows block
> >elements.  Put the <br /> within one of the <div> tags.
> 
> This does indeed fix the problem, but it doesn't come out the way I had
> intended.  If I put it at the end of the first <div>, I see no break in IE6. 
> If I put it at the beginning of the second <div>, it breaks but puts the space
> inside my navigational menu, so that I have a double-height box with an empty
> top half.
> 
> Is there another way of handling this?
> 
> Bob Sullivan                               scp_sulli at sals.edu
> Schenectady County Public Library (NY)     http://www.scpl.org
> 





More information about the Web4lib mailing list