![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
|
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?
__________________
![]() ![]() ![]() "I'm selflessly supporting the common good, but only coincidentally looking out for No.1." |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: May 2003
Posts: 3,765
|
Code:
ul li { margin: 0; }
__________________
flexx [dot] aeon [at] gmail |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
|
Quote:
Code:
*{margin:0px;padding:0px;}
__________________
![]() ![]() ![]() "I'm selflessly supporting the common good, but only coincidentally looking out for No.1." |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: May 2002
Posts: 1,488
|
Code:
<ul style="margin: 0;"> <li>knklnlkn</li> <li>lknlonln</li> </ul>
__________________
![]() "The towers are gone now, reduced to bloody rubble, along with all hopes for Peace in Our Time, in the United States or any other country. Make no mistake about it: We are At War now -- with somebody -- and we will stay At War with that mysterious Enemy for the rest of our lives." H.S.T. 09/12/01 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Industry Role:
Join Date: May 2003
Posts: 3,765
|
Quote:
![]()
__________________
flexx [dot] aeon [at] gmail |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Apr 2009
Posts: 1,319
|
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?
__________________
History will be kind to me for I intend to write it. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Apr 2006
Posts: 682
|
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: May 2002
Posts: 1,488
|
Worked for me...
__________________
![]() "The towers are gone now, reduced to bloody rubble, along with all hopes for Peace in Our Time, in the United States or any other country. Make no mistake about it: We are At War now -- with somebody -- and we will stay At War with that mysterious Enemy for the rest of our lives." H.S.T. 09/12/01 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Too lazy to set a custom title
Industry Role:
Join Date: Feb 2003
Location: NJ
Posts: 13,331
|
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.
__________________
ISeekGirls.com since 2005 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Programming King Pin
Industry Role:
Join Date: Oct 2003
Location: Montreal
Posts: 27,360
|
Quote:
![]()
__________________
UUGallery Builder - automated photo/video gallery plugin for Wordpress! ![]() ![]() ![]() ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Industry Role:
Join Date: May 2003
Posts: 3,765
|
sigh.. had to open the dreamweaver
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;"> <li>knklnlkn</li> <li>lknlonln</li> </ul> ![]()
__________________
flexx [dot] aeon [at] gmail |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: Wisconsin
Posts: 4,517
|
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;} |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 | |
Confirmed User
Join Date: Apr 2009
Posts: 1,319
|
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:
__________________
History will be kind to me for I intend to write it. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
♦ Web Developer ♦
Industry Role:
Join Date: May 2005
Location: Full-Stack Developer
Posts: 12,469
|
ul { margin: 0; padding: 0}
ul li { display: block; width: 100%; } Test that out. |
![]() |
![]() ![]() ![]() ![]() ![]() |