467,888 Members | 1,543 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,888 developers. It's quick & easy.

floating div's and lists

Hi there, i'm having a problem when a list appears immediately after a
floating div element... the bullet points or numbers appear behind the
image in both IE and Firefox... i've tried wrapping the list item in a
div and setting the margins and padding of the list but they seem to
refer to the far left of the page so if i've got two floating divs
next to each then a wider padding or margin is required ... here's my
code:

<HTML>
<HEAD>
<TITLE>CMS</TITLE>
<style>
div.divalignleft { float:left; }

div.listitem {}
</style>
</HEAD>
<body>

<div class="divalignleft">
<img src="pictures/26.jpg" width="77" height="80" />
</div>
<div class="listitem">
<ol><li>(new)</li><li>(new)</li></ol>
</div>
</body>
</HTML>

Am i being stupid??

Cheers

James
Jul 20 '05 #1
  • viewed: 2486
Share:
1 Reply
I have discovered the answer...

div.listitem li, ol{
margin: 0px;
padding: 0px;
list-style-position: inside;
text-indent:20px;

}

ja***@jimw.co.uk (James Walker) wrote in message news:<82**************************@posting.google. com>...
Hi there, i'm having a problem when a list appears immediately after a
floating div element... the bullet points or numbers appear behind the
image in both IE and Firefox... i've tried wrapping the list item in a
div and setting the margins and padding of the list but they seem to
refer to the far left of the page so if i've got two floating divs
next to each then a wider padding or margin is required ... here's my
code:

<HTML>
<HEAD>
<TITLE>CMS</TITLE>
<style>
div.divalignleft { float:left; }

div.listitem {}
</style>
</HEAD>
<body>

<div class="divalignleft">
<img src="pictures/26.jpg" width="77" height="80" />
</div>
<div class="listitem">
<ol><li>(new)</li><li>(new)</li></ol>
</div>
</body>
</HTML>

Am i being stupid??

Cheers

James

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Andrew | last post: by
3 posts views Thread by JHR | last post: by
4 posts views Thread by Ivor Somerset | last post: by
4 posts views Thread by tbirnseth | last post: by
5 posts views Thread by jemcgui | last post: by
6 posts views Thread by Jeremy | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.