User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 401,693 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,757 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 1589 | Replies: 2
Reply
Join Date: Oct 2004
Location: San Francisco, CA
Posts: 338
Reputation: paradox814 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 2
paradox814's Avatar
paradox814 paradox814 is offline Offline
Posting Whiz

problems aligning lists with CSS

  #1  
Nov 28th, 2005
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?

http://dems.brangle.com/list.jpg

[html]<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>[/html]
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Posts: 1,590
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 34
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: problems aligning lists with CSS

  #2  
Nov 29th, 2005
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.
Reply With Quote  
Join Date: Dec 2005
Location: Iron River, Michigan
Posts: 9
Reputation: Glynis is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Glynis's Avatar
Glynis Glynis is offline Offline
Newbie Poster

Solution Re: problems aligning lists with CSS

  #3  
Dec 7th, 2005
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb HTML and CSS Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 8:01 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC