How can I fix this problem?
for example, I have this piece of code:

<ul>
       <li></li>
       <li></li>
       <li></li>
</ul>

Now with the CSS I've set the margin to 0 between the <li>'s,
yet in IE it shows 1px margin between them.
when I'm trying to add things beneath that's impossible,
because it doesn't get equal throughout the browsers,
how can I fix that problem?

Thanks in advance.

Recommended Answers

All 5 Replies

So there is no solution to this problem ?

Can you show us a picture of what's happening? Without setting any css, the list items don't show any margin between other items for me; IE6.

Or if you mean elements following the list have a gap then you'd set the UL to margin 0.

I know that there is the same problem with Text input fields,
there's 1px extra margin on the top and the bottom of the input in IE6
How can I delete it?

Are you sure that is the 1px margin of LI elements? It maybe the padding, or it's parent margin or padding. So you need to try with all margin and padding with 0, include it's parent UL. Example:

ul {
    margin: 0;
    padding: 0
    }
ul li {
   margin: 0;
   padding: 0
    }

It should be show same result in all browser.

How can I fix this problem?
for example, I have this piece of code:

<ul>
       <li></li>
       <li></li>
       <li></li>
</ul>

Now with the CSS I've set the margin to 0 between the <li>'s,
yet in IE it shows 1px margin between them.
when I'm trying to add things beneath that's impossible,
because it doesn't get equal throughout the browsers,
how can I fix that problem?

Thanks in advance.

here is a simple code about CSS margin

<html>
<body>
In this forum you will
see there is some space (though a very little amount)
all around. But there is no space whenever you
will disply this html code inside your browser.
<blockquote>


But there will be some spaces all around this
blockquote. Both left, right, top, bottom side.


</blockquote>
You are recommended to join and discuss your problems there
</body>
</html>

If you run above html code, you will see all around of blockquote text there is space.
But don't have control how much space will be all around. In CSS, this space is
called "margins" and margins are controlled by four properties, margin-left, margin-right,
margin-top and margin-bottom. We can minimize space around blockquote by following css code,


blockquote {
margin-top: 1em;
margin-right: 0em;
margin-bottom: 1em;
margin-left: 0em;
}

For more information you can visit
here CSS Margin

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.