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!

lists

Status
Not open for further replies.

Cullen411

Programmer
Aug 17, 2005
89
GB
Below is my code, I've done a bit of research on this and can't seem to find an answer. When I run the page the list actually sits out from the viewport, how can I get it right on or beside the left hand side.

css
ul {list-style-type:none;margin-left:0;padding-left:0}
li {margin-left:0;padding-left:0}

html

<body>
<ul>
<li>link1</li>
<li>link2</li>
</ul>

</body>


thank you.
 
It's worth noting that different browsers apply different default values to margin and padding on various elements.

I find it useful to put everything on an even playing field right from the start using something like:

Code:
html * { margin:0; padding:0; }

This will set everything to no have a margin or padding, letting you specify them as and when you need.

The "html" isn't strictly necessary but I kind of prefer it in there as I think it makes things clearer.

Foamcow Heavy Industries - Web design and ranting
Buy Languedoc wines in the UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top