GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Space around <li> tags... (https://gfy.com/showthread.php?t=926842)

Voodoo 09-09-2009 09:03 PM

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?

FlexxAeon 09-09-2009 09:07 PM

Code:

ul li { margin: 0; }
or it might be padding i can't remember. try both

Voodoo 09-09-2009 09:09 PM

Quote:

Originally Posted by FlexxAeon (Post 16300260)
Code:

ul li { margin: 0; }
or it might be padding i can't remember. try both

Yeah, I use:
Code:

*{margin:0px;padding:0px;}
At the top, but have also tried it on the actual element. The padding is still there. ;-/

Darkland 09-09-2009 09:22 PM

Code:

<ul style="margin: 0;">
  <li>knklnlkn</li>
  <li>lknlonln</li>
</ul>

That what you are looking for?

FlexxAeon 09-09-2009 09:26 PM

Quote:

Originally Posted by Darkland (Post 16300296)
Code:

<ul style="margin: 0;">
  <li>knklnlkn</li>
  <li>lknlonln</li>
</ul>

That what you are looking for?

wait do you put it on the ul? i'm blanking. dont make me open dreamweaver :mad:

ProG 09-09-2009 09:29 PM

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?

ungratefulninja 09-09-2009 09:30 PM

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.

Darkland 09-09-2009 09:31 PM

Quote:

Originally Posted by FlexxAeon (Post 16300309)
wait do you put it on the ul? i'm blanking. dont make me open dreamweaver :mad:

Worked for me...

TheSenator 09-09-2009 09:35 PM

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.

Basic_man 09-09-2009 09:39 PM

Quote:

Originally Posted by TheSenator (Post 16300340)
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.

Hit me up on ICQ (349-164-75) if you need a CSS mod done :thumbsup

FlexxAeon 09-09-2009 09:43 PM

Quote:

Originally Posted by Darkland (Post 16300326)
Worked for me...

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>

no css expert necessary :thumbsup

Lycanthrope 09-09-2009 10:06 PM

You will alleviate a lot of aggravation by one simple change when you are first zeroing things out:

change

Code:

* {margin:0px; padding:0px;}
to

Code:

* {margin:0; padding:0;}

ProG 09-09-2009 10:19 PM

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:

The format of a length value (denoted by <length> in this specification) is a <number> (with or without a decimal point) immediately followed by a unit identifier (e.g., px, em, etc.). After a zero length, the unit identifier is optional.

Miguel T 09-09-2009 10:54 PM

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