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

Remove blank line below <UL>

P: n/a
Is there a way to reduce the size of the blank line (height) between <ul>
and <li> tags in CSS?

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


P: n/a
"Jon Glazer" <jg***************@adconn.com> wrote:
Is there a way to reduce the size of the blank line (height) between <ul>
and <li> tags in CSS?


Set margin-top and margin-bottom for the affected elements.

Remember that when you have two adjacent elements the margin between
them will be the larger of the margin-bottom of the upper element and
the margin-top of the lower element.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 21 '05 #2

P: n/a
Tried;

ul { margin-left: 10px; margin-bottom:1px; }
li{ margin-top:1px; }

With no effect at all. Am I missing something?

Jon
"Steve Pugh" <st***@pugh.net> wrote in message
news:oe********************************@4ax.com...
"Jon Glazer" <jg***************@adconn.com> wrote:
Is there a way to reduce the size of the blank line (height) between <ul>
and <li> tags in CSS?


Set margin-top and margin-bottom for the affected elements.

Remember that when you have two adjacent elements the margin between
them will be the larger of the margin-bottom of the upper element and
the margin-top of the lower element.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>

Jul 21 '05 #3

P: n/a
Jon Glazer wrote:
Tried;

ul { margin-left: 10px; margin-bottom:1px; }
li{ margin-top:1px; }

With no effect at all. Am I missing something?

Try "ul { margin-top: 0px; }".

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 21 '05 #4

P: n/a
"Jon Glazer" <jg***************@adconn.com> wrote:
"Steve Pugh" <st***@pugh.net> wrote in message
news:oe********************************@4ax.com.. .
"Jon Glazer" <jg***************@adconn.com> wrote:
Is there a way to reduce the size of the blank line (height) between <ul>
and <li> tags in CSS?


Set margin-top and margin-bottom for the affected elements.

Remember that when you have two adjacent elements the margin between
them will be the larger of the margin-bottom of the upper element and
the margin-top of the lower element.

Tried;

ul { margin-left: 10px; margin-bottom:1px; }
li{ margin-top:1px; }

With no effect at all. Am I missing something?


Apart from how to post properly in order to facilitate logical
communication you seem to be missing two things. The first is that
left and top are only the same after a few beers ;-) and the second is
a URL so we can see what's actually happening in the context of a web
page.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 21 '05 #5

P: n/a
"Steve Pugh" wrote in comp.infosystems.www.authoring.stylesheets:
"Jon Glazer" <jg***************@adconn.com> wrote:
Is there a way to reduce the size of the blank line (height) between <ul>
and <li> tags in CSS?


Set margin-top and margin-bottom for the affected elements.


It may also be necessary to set padding-top and padding-bottom.

--

Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
Jul 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.