Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-15-2009, 12:53 AM   PM User | #1
jfinner1
New Coder

 
Join Date: Jun 2008
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
jfinner1 is an unknown quantity at this point
List Alignment Problems

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!
jfinner1 is offline   Reply With Quote
Old 12-15-2009, 02:07 AM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
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 -
Code:
.leftalign ul{
margin: 0 0 0 20px;
}
Also, for what you're doing with lists there, a Definition List might be fun.
Code:
<dl>
<dt>title</dt>
<dd>list item</dd>
<dd>list item</dd>
<dd>list item</dd>
</dl>
It's title gives you one more line to style. Some examples here.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

Last edited by Excavator; 12-15-2009 at 02:12 AM..
Excavator is offline   Reply With Quote
Old 12-15-2009, 11:59 AM   PM User | #3
LE1
New Coder

 
Join Date: Nov 2009
Posts: 47
Thanks: 4
Thanked 1 Time in 1 Post
LE1 is an unknown quantity at this point
Whats the advantage of using "dl"
How does it difer to "ul"
I've not used them before.
LE1 is offline   Reply With Quote
Old 12-15-2009, 12:28 PM   PM User | #4
nick1988
New Coder

 
Join Date: Mar 2009
Location: Milton Keynes, England
Posts: 54
Thanks: 4
Thanked 4 Times in 4 Posts
nick1988 is an unknown quantity at this point
http://www.w3.org/TR/html401/struct/lists.html

Maybe this link helps LE1
nick1988 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:31 PM.


Advertisement
Log in to turn off these ads.