Jump to content

Interesting problem


Accurax

Recommended Posts

At the risk of becoming a pest, i have stumbled accross a rather infuriating problem.... I've asked several people, and as yet no-one has managed to figure out what is happening.

The problem:
I have a div tag #divleft ... it which i have a simple un ordered list with 10 li elements, here is the code for the list:

[code]  <div id="divLeft">
    <ul id="ulmainnav">
  <li> Accounting Services & Hosted Software</li>
  <li>Payroll Services</li>
  <li>Credit Controll</li>
  <li>Archiving Solutions</li>
  <li> Cost Down Programs</li>
  <li>Quality Systems</li>
  <li>Business Planning</li>
  <li>Search & Selection</li>
  <li>Marketing Solutions</li>
  <li>VOIP Solutions</li>
  </ul>
  </div>[/code]

And here is the CSS for both the list elements and the div itself respectivly

[code]#ulmainnav li {
list-style-type: none;
text-align: left;
margin:0;
width: 120px;
padding: 0;
}
#ulmainnav ul {
padding:0;
margin:0;
}[/code]

and the div:

[code]#divLeft {
float: left;
width: 120px;
background-color: #C4D0E7;
line-height: normal;
clear: left;
}[/code]

the problem is that the list elements seem to justify themselves at some imaginary point halfway accross the div tag, rather than at the left hand edge as i would like. This especially a problem in firefox, as the text actually breaks out of the divtag and runs into whitespace on the page.... looking pretty tatty.

Has anybody got any idea whats causing this.... and how it can be fixed??

Thanks
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.