Can someone help with this code.

liunx

Guest
I don't understand what is going on. I'm modifying my original code. Anyways long and short is this.

When I add content to the body of the page it creates a margin at the top of the page. :confused:

Here are the 2 examples.
Index1 (<!-- m --><a class="postlink" href="http://www.cotto-crudo.com/sample/index1.html">http://www.cotto-crudo.com/sample/index1.html</a><!-- m -->)
Index2 (<!-- m --><a class="postlink" href="http://www.cotto-crudo.com/sample/index2.html">http://www.cotto-crudo.com/sample/index2.html</a><!-- m -->)

Both use the same style sheet.
Style Sheet (<!-- m --><a class="postlink" href="http://www.cotto-crudo.com/sample/1.css">http://www.cotto-crudo.com/sample/1.css</a><!-- m -->)

The only thing difference is the links in the between the body tags.

Of by the way, did I mention, it only doesn't work in Netscape, in IE it looks find, go figure.It's the ul's default padding/margin. Set the padding and margin to 0, and you should be good to go. ;)Thanx, I will try that.

But when I try something other than ul it still does it.

Index5 (<!-- m --><a class="postlink" href="http://www.cotto-crudo.com/sample/index5.html">http://www.cotto-crudo.com/sample/index5.html</a><!-- m -->)Originally posted by p2bc
Thanx, I will try that.

But when I try something other than ul it still does it.

Index5 (<!-- m --><a class="postlink" href="http://www.cotto-crudo.com/sample/index5.html">http://www.cotto-crudo.com/sample/index5.html</a><!-- m -->)

try the margin and padding 0px on the "p". i find it helpful to make my first css declaration into one which sets almost every element of the page to 0 margin and padding.Well I did it, and well it wasn't clear cut.

Originaly the code was:
ul li
{
display:inline;
}
So I tried, after your suggestion:
ul li
{
display:inline;
margin:0px;
padding:0px;
}
And that still did not do it.Played with it, and played with it, and played with it some more and came up with:
ul li
{
display:inline;
}

ul
{
margin:0px;
padding:0px;
}
Actually I looked at some other code that someone from this forum help me with a while back, and notice he seperated the two. Otherwise I would still be playing.

Thanks guys. I might actually get this finished. :)

Oh, is there an easier way to control the margin and padding without having to put in for every description?

For instance:
"all tags"
{
padding:0;
margin:0;
}

Just asking.I believe that
*{
margin:0px;
padding:0px;
}
will accomplish this... someone please correct me if I'm wrong...Actually I looked at some other code that someone from this forum help me with a while back, and notice he seperated the two.
The reason is the

ul li {...}

selector means apply this to any LI inside a UL block. What you wanted was

ul,li {...}

which means apply this to all ULs and LIs regardless of where you find them.Thanks, that makes so much more sence.

Can always count on the great people in this forum.
Thanks again guys.
 
Back
Top