I want to make a list where the list is complexly aligned against the left hand side. Here is an example code snippet that I am using, I put the list inside a black table so you can see the gap. How do I get rid of them?

[IMG]http://dems.brangle.com/list.jpg[/IMG]

<html>
<head>
<style type="text/css">
ul {
	list-style-type: disc;
}
td {
	color: #FFFFFF;
	text-align: left;
	vertical-align: top;
	background-color: #000000;
	width: 300px;
}

</style>
</head>
<body>
<table><tr><td>
	<ul>
		<li>Link 1</li>
		<li>Link 2</li>
		<li>Link 3</li>
	</ul>
</td></tr></table>

</body>
</html>

You need to set the "margin" and "padding" attributes in each of your block-level elements. You also need to set a proper "doctype" for your page.

tgreer advise is good. If your list still won't align left, you might have to put the entire list in a div again setting the margins and padding and also doing text-align: left.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.