473,320 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Remove blank line below <UL>

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

Jul 21 '05 #1
5 12225
"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
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
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
"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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Michael | last post by:
This is a two-part question to which I haven't been able to find an answer anywhere else. 1. Is it possible to format the bullet/number character of the <li>? In my styles sheet, I have the <li>...
1
by: Randall Sell | last post by:
OK, I am utterly stumped. The code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <style type="text/css"> ul {...
5
by: toylet | last post by:
Attached is some css codes for a website. It has 3 parts: top-bar, side-bar (on the left) and main-body. The top-bar has a mouseover menu called top-menu implemented via ul:hover. When the mouse...
5
by: Timo Nentwig | last post by:
Hi! Is it possible that there's no empty line inserted after an <UL>? Timo
16
by: michael | last post by:
Is it possible to get all href URLs contained in a unordered list and place them in an array? Or in fact two different arrays, differently named one for each <ul> group? <ul> <li><a...
6
by: Jean Pion | last post by:
Dear Readers, With the following CSS I wanted to create a list, where there is no empty line between the 'title' and the list. Also put the bullets closer to the left margin. And the spacing...
2
by: Olivier Verdin | last post by:
Hi, It seems that it is not possible to use <il> tag inside an asp.net repeater. Is there any way to overcome this difficulty? Thanks, Olivier
2
by: Shahid | last post by:
Hi, I am parsing an .HTML file that contains following example code: <div> <p class="html_preformatted" awml:style="HTML Preformatted" dir="ltr" style="text-align:left"><span...
7
by: turnernm | last post by:
error: document type does not allow element "ul" here; missing one of "object", "ins", "del", "map", "button" start-tag what i wanted in my site was to float an img to the left and a list to the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.