Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ul bulleted list alignment problem

Status
Not open for further replies.

TestingXSD

Programmer
Mar 24, 2002
11
US
I have page that has a wrapping div tag with another "nav" type div tag contained within. My problem is that the bullets for the list in the main section do not intent as they should.

The only work around I have found is set either the indent for the li or to set margins on the ul. I can't do this because the "nav" table does not appear on all pages.

Here is an example of the problem page:

<html>
<head>
<title>testing</title>
<style>
p{
FONT-FAMILY:Arial;
}
div.Nav{
padding-left:10px;
padding-right:10px;
float:left;
font-weight:bold;
BACKGROUND-COLOR: #f0f0f0;
width:30%;
height: auto;
margin-right: 20px;
padding-bottom: 20px;
position: static;
display:inline;
clear:none;
}
</style>
</head>
<body>
<div class="Main">
<div class="Nav">
<p>links</p>
<p>links</p>
<p>links</p>
<p>links</p>
<p>links</p>
</div>
<p> other content</p>
<p> other content</p>
<p> other content</p>
<ul>
<li>list item</li>
<li>list item</li>
<li>list item</li>
<li>list item</li>
<li>list item</li>
<li>list item</li>
</ul>
</div>
</body>
</html>

If you paste this into an HTML doc you see that the bullets for the list are on the same vertical axes as the paragraph tags. If you change the float on the nav div then the bullets intent as they should.

I'm stumped.

-T
 
why don't you define the <ul> tag with CSS?

Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
 
I can't define the ul tag with CSS either because there has to be one style sheet for over 8000 documents. If I define a margin here then it will be a margin for the othe 7999 documents. I can't give it one specific label wither because this document is displayed multiple places, each with it's own style sheet. One place may have the nav floated left, the other my suppress it.

-T
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top