473,403 Members | 2,366 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,403 software developers and data experts.

IE - Working with lists and gaps

In IE (7 and 8 are my concern) I have some list items that are more than one line. I'm not sure if this is what causes it but my lists have large gaps between them. It looks horrendous.

Anybody know a work around?


this is my css and html

Expand|Select|Wrap|Line Numbers
  1. <ul>
  2. <li>
  3. <a href="my.html">Testing Link</a>
  4. </li>
  5.  
  6. </ul>
  7.  
Expand|Select|Wrap|Line Numbers
  1. #leftpane ul
  2. {
  3.     padding:0px;
  4.     margin:0px;
  5.     list-style:none;
  6. }
  7. #leftpane ul li
  8. {
  9.     padding:0px;
  10.     margin:0px;
  11. }
  12. #leftpane ul li a
  13. {
  14.     display:    block;
  15.     font-size:    90%;
  16. }
  17. #leftpane ul li a:hover
  18. {
  19.     display:    block;
  20.     background:    #EAEAEA;
  21. }
  22.  
  23.  
  24.  
Aug 4 '09 #1
4 1351
When you choose to use "display:block" on your elements it puts a line break before and after the element, so I think that is what's causing your list items to be more than one line.
Aug 4 '09 #2
I need them block so the width words properly on the mouseover. maybe I should include a clear... I don't really know.
Aug 4 '09 #3
Are you declaring your doctype? If not that might be the reason why it's adding unwanted space in IE.

You could also try adding "width:100%;" to the "a" elements. Assuming of course that works for your layout and what you are trying to accomplish. Like so:

Expand|Select|Wrap|Line Numbers
  1. #leftpane ul li a
  2. {
  3.     display:    block;
  4.     font-size:    90%;
  5.     width:100%;
  6. }
  7. #leftpane ul li a:hover
  8. {
  9.     display:    block;
  10.     background:    #EAEAEA;
  11.     width:100%;
  12. }
  13.  
Aug 4 '09 #4
The doc type is declared. Add 100% width fixed the problem, at least in IE8. Thanks kindly!
Aug 5 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Hans Maurer | last post by:
>Description: We're running our current TTS application with MySQL (on Unix). All database, table and column names are in lower-case. However, we need to access this database with a new...
6
by: Sulsa | last post by:
Does memory allocated by opperator new has gaps, or is it one big block of memory??
9
by: Thomas R. Hummel | last post by:
Hello, I am importing data that lists rates for particular coverages for a particular period of time. Unfortunately, the data source isn't very clean. I've come up with some rules that I think...
5
by: cool2005 | last post by:
I have a table contains 4 cells (2 x 2) like this http://www.coolshare.com/planttrade/temp/gap.jpg each cell contains a div and the div contains a table. As you can see from the image above,...
3
by: Robert McGregor | last post by:
Hi there, I was wondering if anyone could help with this problem. I have a table with about 250,000 rows that relate to files that have been processed elsewhere in our business. Each file has...
5
by: Arno R | last post by:
I need to find the 'gaps' in a numbered recordset like: 1 Philips 2 Jones 5 Jo Do 6 Frenzy 10 John Matthias 23 Arno R (and so on ....) What I need is one...
2
by: pecan | last post by:
Okay, I give up. How do I do it? (Spent the last 4 hours searching for a solution) Here's the url: http://www.rouxville.info/rouxville-index.htm I can get this to display correctly in IE, but...
20
by: Charles | last post by:
Hello, On my web site, I have a <selectdrop-down menu that allows to show/ hide divs: http://tchernobyl.dreamhosters.com - The problem is that it doesn't work in IE7 (only tested in Opera and...
2
by: jaka | last post by:
Hi, I'm in need of some expert help in sorting a numerical/alphanumerical employee ID field (5&6 characters in length). Also seperating the alphanumerical IDs and finding the gaps in the...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...

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.