By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,625 Members | 2,250 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,625 IT Pros & Developers. It's quick & easy.

no empty line after <UL>

P: n/a
Hi!

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

Timo
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
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.