Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different results in IE and FF

Status
Not open for further replies.

leeboycymru

Programmer
Jan 23, 2007
185
GB
I have a php output from a database that is being controlled with css also to create a list.

Its fine in Mozilla, but not in IE. Can anybody see why.

ul {
list-style-type: none;
margin: 7px;
padding: 0;
}
li {
/*border-right: 1px solid #777;*/
float: left;
margin: 0 .3em 0 -.3em;
padding: 0 .6em 0 .6em;
}


and here is the link:


cheers

Lee
 
This is still very poorly done. Every item is in each own unordered list, which is a waste. Elements are floated, when they are actually just inline text. Make sure they all render in one list and then start styling that list. I would opt for making it entirely inline.
 
Hi Vragabond, could you suggest an answer to the wrap around problem in IE, so I can at least let it to go live whilst I work on improving it and doing it properly.

Lee
 
I suggest you try this:
Code:
.navlist
{
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: inline;
}

.navlist li
{
  display: inline;
  line-height: 1.1em;
  margin: 0 .5em 0 -.5em;
  padding: 0 .5em 0 .5em;
}
That should be more what you're after.
 
Thank you vragabond, I didnt see this reply...

But It does sort of throw up another issue which i found using span.

In that although it doesnt now create a new line for itself it does however still split the link in 2 one bit on one line, and the other on another.

sorry about the new post.

lee
 
Then just add this as well to the mix:
Code:
.navlist a {
  white-space: nowrap;
}
 
Oh Vragabond,

Thank you so much...

that worked and as I saw that it did, my stress level reduced by a a tonne...

Thanks again

and sorry about the extra post.

lee
 
You're welcome. I would still change the way you output the list (to the format I suggested in PHP forum). Now that you are no longer stressed out, you could work on changing the sql to make it retrieve all the records.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top