469,328 Members | 1,324 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,328 developers. It's quick & easy.

no empty line after <UL>

Hi!

Is it possible that there's no empty line inserted after an <UL>?

Timo
Jul 20 '05 #1
5 6923
Ivo
"Timo Nentwig" <tc*@spamgourmet.org> wrote in message
news:2g************@uni-berlin.de...
Hi!

Is it possible that there's no empty line inserted after an <UL>?

Timo


If you can dream it, a browser can do it.

ul { margin-bottom: 0; }

HTH
Ivo
Jul 20 '05 #2
Ivo wrote:
If you can dream it, a browser can do it.


Gee, how poetic. :-)

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #3
"Ivo" <no@thank.you> wrote in
comp.infosystems.www.authoring.stylesheets:
"Timo Nentwig" <tc*@spamgourmet.org> wrote in message
news:2g************@uni-berlin.de...
Is it possible that there's no empty line inserted after an <UL>?


ul { margin-bottom: 0; }


I rather suspect that applies to the margin at the end of the list,
not the margin at the end of the opening <ul> tag.

To prevent a blank line after the (invisible) <ul> tag, I bet you
need
li { margin-top: 0 }

But I haven't actually tried this.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #4
Ivo
"Stan Brown" wrote
"Ivo" <no@thank.you> wrote
"Timo Nentwig" <tc*@spamgourmet.org> wrote
Is it possible that there's no empty line inserted after an <UL>?


ul { margin-bottom: 0; }


I rather suspect that applies to the margin at the end of the list,
not the margin at the end of the opening <ul> tag.

To prevent a blank line after the (invisible) <ul> tag, I bet you
need
li { margin-top: 0 }

But I haven't actually tried this.


There is no margin at the end the ul opening tag, if that means the same
spot as the beginning of the first <li>. Nor do li's have vertical margins
by default in the browsers I know, or lists would grow long very quickly.
The line I gave earlier, ul { margin-bottom: 0; }, suffices.
Let's keep the Usenet noise to a minimum.
Ivo
Jul 20 '05 #5
On Mon, 17 May 2004 07:27:56 +0200, Ivo <no@thank.you> wrote:
"Stan Brown" wrote
To prevent a blank line after the (invisible) <ul> tag, I bet you
need
li { margin-top: 0 }

There is no margin at the end the ul opening tag, if that means the same
spot as the beginning of the first <li>.


Yes there are. Opera 7.23 renders lists with an appx 1em top margin and no
bottom margin. IE6 and Mozilla 1.6 both put appx 1em margins on top and
bottom.

It's unclear whether OP wanted margins at all, and precisely where - this
extra information might or might not be useful to him. But, as top and
bottom margins collapse, to eliminate a blank space from between adjacent
lists both top and bottom margins must be zeroed out.
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by bearclaws | last post: by
9 posts views Thread by Akseli Mäki | last post: by
5 posts views Thread by toylet | last post: by
6 posts views Thread by capricious | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.