Forum Moderators: not2easy

Message Too Old, No Replies

Inline margin/padding issue

Only float gets rid of it, but I can't center it?

         

jenstechs

10:01 pm on Sep 15, 2009 (gmt 0)

10+ Year Member



I have been struggling with this issue for a while, it's bugging the crap out of me. It seems like there should be a simple solution, or at least some solution somebody smarter than me has developed over the years.

I am trying to duplicate this menu effect:
<snip>

but WITHOUT the gap at the left of each list item in the rollover. It works when the items are floated to the left:
<snip>

but I want to center the list. I've tried everything I can think of with no luck.

Is this just an unfortunate "feature" of inline CSS elements, that they have a left margin even when specified as 0?

[edited by: swa66 at 7:08 am (utc) on Sep. 16, 2009]
[edit reason] No links, please see ToS and Forum Charter [/edit]

swa66

7:19 am on Sep 16, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The space between inline elements are addeed at line breaks between elements in your html.

Some browsers let them be betweeen the lements, some browsers add them inside the element.

One way to get rid of it is by putting all of the source html on one line ... (hurts readability), the other way to deal with them is via padding and conditional comments.