View Full Version : List Alignment Problems

12-15-2009, 01:53 AM
Site: http://jfinner1.co.cc/career.html

Ok, so the issue I'm having is as follows. I have an external style sheet that center aligns my main content. I obviously don't want the lists on this page to be centered, so I added a styles tag at the top telling it to left align. Well, it worked a bit too well, because the lists are all aligned left, with no spacing for what should be indented tabs. Not sure how to fix this. Any help will be much appreciated. Thanks!

12-15-2009, 03:07 AM
Hello jfinner,
You've zero'd out the default margin/padding. Now that you want some, you need to declair your own.
Start with something like this -

.leftalign ul{
margin: 0 0 0 20px;

Also, for what you're doing with lists there, a Definition List (http://www.w3schools.com/TAGS/tag_dl.asp)might be fun.

<dd>list item</dd>
<dd>list item</dd>
<dd>list item</dd>
It's title gives you one more line to style. Some examples here. (http://nopeople.com/CSS/dl/index.html)

12-15-2009, 12:59 PM
Whats the advantage of using "dl"
How does it difer to "ul"
I've not used them before.

12-15-2009, 01:28 PM

Maybe this link helps LE1 :)