Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Removing padding/margin from list
Old 08-21-2007, 05:17 PM Removing padding/margin from list
Skilled Talker

Posts: 58
Trades: 0
Hi,

How would I remove any padding or margins from a <ul> list? My list has an indent, and I want to remove that entirely.

This is my code for the list

Code:
ul#list-menu {
list-style:none;
width:139px;
}

ul#list-menu li a {
text-decoration:none;
display:block;
margin:0px;
padding-bottom:10px;
padding-left:0px;
padding-right:0px;
padding-top:0px;
color:#111111;
}

ul#list-menu li a:hover {
color:#AAA469;
}
I've tried setting the padding, other than the bottom padding, and the margin to 0 but it there is still an indent.
lilycup is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-21-2007, 07:23 PM Re: Removing padding/margin from list
DrSeuss's Avatar
Skilled Talker

Posts: 60
Name: Matt
Trades: 0
I by no means am an expert, but wouldn't you want your list properties to be set as a class, rather than a id?

ul.list-menu {

in html : <ul class="list-menu"...

rather than

ul#list-menu {

As for your question... perhaps your list is picking up a margin from another style? I think the experts would ask to see the complete stylesheet, and html to determine that.... maybe?

I myself have been having trouble with lists and bullet images and found a way around it
DrSeuss is offline
Reply With Quote
View Public Profile
 
Old 08-21-2007, 07:32 PM Re: Removing padding/margin from list
Experienced Talker

Posts: 49
Trades: 0
either post more of the code, or show me a screenshot of the indent.
__________________
Time to upgrade your website! Visit us at:
Please login or register to view this content. Registration is FREE
.
- Professionals Designs with Details
Cyrus is offline
Reply With Quote
View Public Profile
 
Old 08-21-2007, 07:57 PM Re: Removing padding/margin from list
Skilled Talker

Posts: 58
Trades: 0
Thank you both for your replies, I have been able to get it working. I think it was margin-left: that finally did it.

And DrSeuss, I think you're right. I need need to use a class. Thanks!
lilycup is offline
Reply With Quote
View Public Profile
 
Old 08-21-2007, 08:51 PM Re: Removing padding/margin from list
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
That depends. Is list-menu going to be used more than once? If so, use an ID (as you've done). If not, use a class.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 08-21-2007, 10:42 PM Re: Removing padding/margin from list
Skilled Talker

Posts: 58
Trades: 0
Yes, the list id will be used more than once. So stick the with id instead of class?

Thank you!
lilycup is offline
Reply With Quote
View Public Profile
 
Old 08-22-2007, 10:17 AM Re: Removing padding/margin from list
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
No, ID's must be unique. If you're going to use a set of rules more than once on a page, then you must use a class and not an ID.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-22-2007, 11:57 AM Re: Removing padding/margin from list
Skilled Talker

Posts: 58
Trades: 0
Thanks, LadynRed, I've read that before but these links do not feature more than once on the same page. It will be used on several different pages, sorry I didn't make that clear.
lilycup is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Removing padding/margin from list
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.35013 seconds with 12 queries