![]() |
Space around <li> tags...
I had a link a while back that told how to get rid of the space around the [li] tags in CSS. Can't seem to find it now. Anyone know how?
|
Code:
ul li { margin: 0; } |
Quote:
Code:
*{margin:0px;padding:0px;} |
Code:
<ul style="margin: 0;"> |
Quote:
|
What is inside the li?
If there is an image inside, try using li img { display: block; } If there is only text and the padding is top & bottom adjust li { line-height: 1em; } Or are you referring to bullet spacing? |
Margin and padding do control the space inside and outside of the LI "box."
If you're wanting to control the space between the bullet point and the text then { text-indent: 0pt;} or something along those lines will do it. |
Quote:
|
Your gonna have to ask a CSS expert.
There is a short hand way of doing this that will work for IE and FIreFox. Im looking for a mod done to my WordPress theme that a CSS expert did for me. It was kinda of the same thing. |
Quote:
|
Quote:
you're right but padding gets rid of the "indentation" while margin gets rid of the space between the ul and the li so to get rid of all space it would be Code:
<ul style="margin: 0; padding: 0;"> |
You will alleviate a lot of aggravation by one simple change when you are first zeroing things out:
change Code:
* {margin:0px; padding:0px;} Code:
* {margin:0; padding:0;} |
0 and 0px are the same thing - that is strictly a preference and makes no difference.
http://www.w3.org/TR/CSS2/syndata.html#length-units Quote:
|
ul { margin: 0; padding: 0}
ul li { display: block; width: 100%; } Test that out. |
All times are GMT -7. The time now is 01:41 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc