...

View Full Version : Lists: indent



Ge64
12-15-2006, 07:01 AM
Hi,

You know when you make a list with <ol> or <ul>, it indents the text to the right like


this


How do I use CSS to change the size of that indent? Like, I want the bullet before 'this' to be under the 'o' in 'You' instead of under the '[space]' like it is now.

I've tried padding, but it change the padding relative to the <td> not relative to the rest of the text. I've tried text-indent but it changes the distance between the bullets and the text itself. I've also tried margin but it doesn't seem to do anything either.

_Aerospace_Eng_
12-15-2006, 07:09 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
html, body {
margin:0;
padding:0;
font-size:13px;
font-family:Verdana, Arial, Helvetica, sans-serif;
}
ul {
margin:0;
padding:0 0 0 24px;
list-style-type:disc;
}
</style>
</head>
<body>
You know when you make a list with ol or ul, it indents the text to the right like
<ul>
<li>this</li>
<li>testing</li>
<li>third test</li>
</ul>
</body>
</html>

Ge64
12-15-2006, 07:17 AM
Thanks, I tried that but I thought there was another way...

edit: aahaa i thought it ignored the cellpadding but I forgot the list-style-position: outside; made it look that way in my case. nevermind, THANKS!

Excavator
12-15-2006, 07:21 AM
ul {
text-indent: 1px;
list-style-type:disc;
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum