Link to home
Start Free TrialLog in
Avatar of MJ
MJFlag for United States of America

asked on

Line Item verticle spacing between <li>

How do I control the gaps between the <li>??? I want to minimize them!
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Sorry, I don't understand what you are aking post some code please.

Cd&
ASKER CERTIFIED SOLUTION
Avatar of benwiggy
benwiggy
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Daydreams
Daydreams

Hi Benwiggy, set the margin to 0:

<html>
<head>
</head>
<style>
.lcontrol { margin:0px;}
</style>
<body>
<ul>
<li class="lcontrol">hi</li>
<li class="lcontrol">test</li>
</ul>
</body>
</html>
Benwiggy,

I noticed some things in your basic code.. you need a doctype of course, and <style> should be <style type=text/css" and also the </head> tag, should come after the </style> tag thus:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type="text/css">
.lcontrol {margin:0px;}  /*or whatever margin you want*/
</style>
</head>
<body>
<ul>
<li l class="lcontrol">hi</li>
<li class="lcontrol">test</li>
</ul>
</body>
</html>
Sorry - correct about the </head> tag but I assumed he would simply add the css to his existing page - well pointed out though.