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

Lists without space above and below?

P: n/a
Is it possible to set up a <ul> with <li> and now have the default
blank line above and below the list itself?

Thanks,
Eric
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
el****@yahoo.com (Eric) wrote:
Is it possible to set up a <ul> with <li> and now have the default
blank line above and below the list itself?


ul{margin:1.4em 0}

--
Spartanicus
Jul 20 '05 #2

P: n/a

"Spartanicus" <me@privacy.net> wrote in message
news:ju********************************@news.spart anicus.utvinternet.ie...
el****@yahoo.com (Eric) wrote:
Is it possible to set up a <ul> with <li> and now have the default
blank line above and below the list itself?


ul{margin:1.4em 0}


I think he meant "not" have the default blank line. That would be:

ul {margin-top: 0; margin-bottom: 0; }

assuming the left and right margins should be left at their defaults.

Jul 20 '05 #3

P: n/a
Spartanicus <me@privacy.net> wrote:
Is it possible to set up a <ul> with <li> and now have the default
blank line above and below the list itself?


ul{margin:1.4em 0}


If you just want to remove the top and bottom margins without affecting
the default margin, you need to use two declarations:
ul { margin-top: 0; margin-bottom: 0; }

This does not remove the margins that adjacent elements may have, e.g.
when you have
<p>text<ul>...</ul><h2>...</h2>
then the default bottom margin of p and the default top margin of h2
affect the rendering, unless overridden.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.