473,765 Members | 2,035 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 12243
"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.c om...
"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.infosystem s.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
6888
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> tag formatted, for example, bold. However, when it's applied, the number of the <li> is not bold, but the text is. Do I have to apply the bold to the <ol> instead? 2. When I use <li>example text</li>, and when I insert a <br> after the </li>,...
1
3754
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 { background-color: red; }
5
9245
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 pointer hovers over the top-menu, the bottom margin of the top-bar expands downwards. How could I make the hover menu to stack on top of the main-body, not expanding the bottom margin of the top-bar? I believe it has something to do with...
5
7415
by: Timo Nentwig | last post by:
Hi! Is it possible that there's no empty line inserted after an <UL>? Timo
16
4451
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 href="lemurs.html">Lemurs</a></li> <li><a href="chameleons.html">Chameleons</a></li> </ul> <ul>
6
6971
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 between two list should be one line. ul.tight {margin-top:0em; margin-left:1.3em;} The html then looks like this
2
3895
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
2362
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 style="font-size:12pt;font- family:'Arial'" xml:lang="en-US" lang="en-US">Normal Text Arial 12 Black before bullets.</span></p> <ul> <li class="html_preformatted" dir="ltr" style="text- align:left">&nbsp;<span style="font-size:12pt;font-family:'Arial'"
7
5898
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 right. this is what i ended up doing to get it to work: <style type="text/css"> ul {float:left;padding-left:100px;} img {float:left;} </style>
0
9399
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10163
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9957
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8832
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.