473,385 Members | 1,531 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,385 software developers and data experts.

removing vertical spacing in LI elements

Hi,

I have a (strict) html document with the following portion:

<ul>
<li><img alt="" src="images/image1.jpg" /></li>
<li><img alt="" src="images/image2.jpg" /></li>
<li><img alt="" src="images/image3.jpg" /></li>
<li><img alt="" src="images/image4.jpg" /></li>
<li><img alt="" src="images/image5.jpg" /></li>
<li><img alt="" src="images/image6.jpg" /></li>
<li><img alt="" src="images/image7.jpg" /></li>
<li><img alt="" src="images/image8.jpg" /></li>
<li><img alt="" src="images/image9.jpg" /></li>
<li><img alt="" src="images/image10.jpg" /></li>
</ul>

I've removed border, padding, margin from all of UL, LI, and IMG
elements
but there is still vertical spacing between the LI's

Sorry I don't have a hosted site with the markup ... I've tried to play
around with other settings such as list-style-type, and displaying UL,
LI as block elements ... but no luck removing the vertical space

any help appreciated,
thank you.

Jan 2 '07 #1
1 6133
da******@hotmail.com a écrit :
Hi,

I have a (strict) html document with the following portion:

<ul>
<li><img alt="" src="images/image1.jpg" /></li>
<li><img alt="" src="images/image2.jpg" /></li>
<li><img alt="" src="images/image3.jpg" /></li>
<li><img alt="" src="images/image4.jpg" /></li>
<li><img alt="" src="images/image5.jpg" /></li>
<li><img alt="" src="images/image6.jpg" /></li>
<li><img alt="" src="images/image7.jpg" /></li>
<li><img alt="" src="images/image8.jpg" /></li>
<li><img alt="" src="images/image9.jpg" /></li>
<li><img alt="" src="images/image10.jpg" /></li>
</ul>

I've removed border, padding, margin from all of UL, LI, and IMG
elements
but there is still vertical spacing between the LI's

Sorry I don't have a hosted site with the markup ... I've tried to play
around with other settings such as list-style-type, and displaying UL,
LI as block elements ... but no luck removing the vertical space

any help appreciated,
thank you.

Inline content sit on a baseline of a line which must provide space for
descenders (like j, q, p, y, g). So, that's why there is a small
vertical space (1-2px) under an image.
Longer explanation and full fix provided at:
http://developer.mozilla.org/en/docs...ysterious_Gaps
http://developer.mozilla.org/en/docs...is_Constructed
If you're developing for Firefox and Seamonkey, may I offer you to visit:

Mozilla Web Author FAQ
http://www.mozilla.org/docs/web-developer/faq.html

and

Using Web Standards in your Web Pages
http://developer.mozilla.org/en/docs...your_Web_Pages
updated in December 2006

Gérard
--
remove blah to email me
Jan 2 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Analysis&Solutions | last post by:
Hi Folks: I've got a weird phenomenon going on with Internet Explorer on the Macintosh... The vertical cell borders are missing between the cells but appear above and below the cells! Here's...
13
by: Dave | last post by:
Hi, what Property and Values are used to space out further from one another the items in a list (assuming it's possible)? The default presentation is a bit "bunched up" for me. Thanks, Dave
1
by: Marek Mänd | last post by:
<style> ..menu{ background:yellow; font:12px Arial; } ..menu li{ margin-bottom:0; margin-top:0; padding-bottom:0; padding-top:0;
16
by: Uncle Pirate | last post by:
This has me stumped. I am trying to use as little space as possible at the top of my document but Firefox/Mozilla insists on placing vertical space before any element. IE displays it correctly...
5
by: Goldy | last post by:
Hello, w/ code like this: <table border="0" cellspacing="0" cellpadding="0"> <asp:Repeater runat="server" id="op"> <HeaderTemplate></HeaderTemplate> <ItemTemplate> <tr> <td...
0
by: teddysnips | last post by:
I have a form with 52 text boxes set out in 4 columns of 11 and one column of 8. Guess what they're used for? That's right, displaying weekly information. So, I'm setting them out on a normal...
2
by: larzeb2000 | last post by:
I made a vertical navbar using a background image for the buttons. When I tested under FF or Opera, it looks fine, with the buttons touching vertically. However, in IE6 the buttons are spaced apart...
1
by: quantass | last post by:
Just a quick question in regards to the Obout Tree View. How do i go about adjusting the horizontal spacing before & after the plus/minus button for each node seperately? Also how do i adjust the...
1
by: mactelesis | last post by:
I have searched for "vertical stretch, align, etc." and have tried (and failed) with all of the solutions to stretch the "#nav vertical" div so that it streches to the height of the page. As you can...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.