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

Having problems with bullet lists in IE7

The bullet lists on my web site (www.hawkinshearing.com) are messed up in IE7 (works fine in IE6, IE5, and Safari). In IE7, the list does not indent and the bullet images do not show up. Any suggestions? Here is the CSS for the site:

Expand|Select|Wrap|Line Numbers
  1. #content ul, #content ol
  2. {
  3.     margin-left: -40px !important;
  4.     text-align: left;
  5.     margin: 0px auto;
  6.     margin-top: 8px;
  7.     margin-bottom: 6px;
  8.     padding: 0px auto;
  9.     list-style:none;
  10. }
  11. #content ul li
  12. {
  13.     font-size:9pt;
  14.     padding-left: 6px;
  15.     background-image: url(../images/li_dot.gif);
  16.     background-repeat: no-repeat;
  17.     background-position: left center;
  18.     color: #5872A0;
  19. }
  20.  
Dec 30 '06 #1
3 17262
Howdy. In your CSS
Expand|Select|Wrap|Line Numbers
  1. margin-left: -40px !important
and
Expand|Select|Wrap|Line Numbers
  1. margin: 0px auto;
are being interpreted differently by IE7 than other browsers. IE7 is showing your image bullets but they are just out of view.

We can comment the above declarations out and use relative positioning instead of negative margins to move the list to the left, and this was agreeable to IE7 and others. Here was my example, with just your list and its CSS:

[HTML]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
ul
{
position: relative;
right: 40px;
/*margin-left: -40px !important;*/
text-align: left;
/*margin: 0px auto;*/
margin-top: 8px;
margin-bottom: 6px;
padding: 0px auto;
list-style:none;
}

ul li
{
font-size:9pt;
padding-left: 6px;
background-image: url(dot.gif);
background-repeat: no-repeat;
background-position: left center;
color: #5872A0;
}
</style>
</head>

<body>
<h3>Welcome To Hawkins Hearing Center</h3>
<p>Our mission at Hawkins Hearing Center is to help you enjoy the sounds of life. We have the solution for almost any situation:</p>
<ul>
<li>People who have begun having difficulty following conversations</li>
<li>Musicians who need to hear their instruments and the rest of the band better without damaging their hearing</li>
<li>Swimmers who need to protect their ears from water</li>
<li>Music lovers who want to hear their mp3 players better</li>
<li>Cell phone users who want custom fit earpieces for their phones</li>
<li>Concert-goers who want to enjoy the music without distortion while still protecting their hearing</li>
</ul>
<p>Call today for more information or to schedule an appointment. At Hawkins Hearing Center, we always provide sound advice about your hearing.</p>
</body>
</html>
[/HTML]

I'm not sure how removing the the two lines above will affect your overall design but it shouldn't be much.
Dec 30 '06 #2
Thanks for your help. My goal is to have the list indent to the right like a traditional bullet list

I tried playing around with the padding in CSS, but it doesn't seem to make any difference, I can't get the text to move to the right.

Thanks again for any help you can offer
Dec 31 '06 #3
You don't need to change the padding, you can just change the "right" property of the ul element.

So right now it reads "right: 40px;". You can make this value 0px and it'll be indented as it would normally. (or just delete it)
Dec 31 '06 #4

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

Similar topics

0
by: Nikolaos Giannopoulos | last post by:
I am trying to get bullet images in paragraphs and lists to align properly - so far Moz 1.3 and Opera 6.05 handle both of these cases fine (NOTE: IE5 as expected does not render a bullet in the 1st...
2
by: puzzled | last post by:
I am trying to use css to control the indentation within items in a list. I would like something that looks like this: Text of a paragraph goes here, leading to the following list: * list...
3
by: Dante | last post by:
Is it possible in lists for the bullet to have a different color than the text? If so how?
7
by: codeslayer | last post by:
Greetings to everyone in ‘forum-land': I have a problem that has plaguing me to no end. It is a CSS-related question, and I have not seen this question posted anywhere in forums or through...
13
by: Matt | last post by:
I would like to set the "list-style-type" to be a hyphen (-). How can I accomplish this in a style sheet. I tried list-style-type: hyphen; and list-style-type: dash; but neither worked. I also...
5
by: Bikhod | last post by:
Hi Refering to my sample below, can anyone please tell me why my list is not appearing correctly on my VS.NET generated web site? The summary and remarks are fine, but the HTML is showing the...
3
by: Jordan S | last post by:
I have been using the old HTML unordered list in order to have bullet-point lists. But they don't look good because there is no white space between each list item. <UL> <LI>List Item Here...
4
by: TheEv | last post by:
I was wondering if anyone knew of the standard way to style Lists. Whenever I style them, especially when I use my own bullet image, They show up very different in each browser. The bullet in...
3
by: vunet | last post by:
When I use image as a bullet within LI element I have different image positioning results in Firefox and IE6. IE6 puts the image on top and far from left LI's border. Firefox puts it nicely in the...
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...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.