473,387 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
1 2623
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: George Hester | last post by:
At the time this suggestion was made I didn't have the wherewithall to even attempt it. But over time I learned enough to make a stab at it. Let just say the foating DIV had to provide the same...
3
by: Andrew | last post by:
Hi I've tried a number of techniques but this one is causing me to wonder whether I'm going to have to go back to using tables to solve this: I want to have some text aligned to the left and...
3
by: JHR | last post by:
Hey all, I'm trying to make a sidebar box float to the right of various items, and for those items to wrap if a user shrinks his browser window. Instead, in every browser I've tried except for...
5
by: Alan Silver | last post by:
Hello, I'm not sure if this is a stupid question or not, so here goes. Suppose I want to achieve the very common design layout as shown here... http://www.kidsinaction.org.uk/floating.html This...
4
by: Ivor Somerset | last post by:
Dear CSS community, The code below shows my problem. I have a containing DIV box into which I place floating boxes. As the background-color shows, the size of the containing box is not extended...
4
by: tbirnseth | last post by:
I'm having trouble between IE and FF. For once, IE behaves as I would expect, but FF doesn't. Basically I have a container with two floating DIVs in it. One floats left and the other right. I then...
5
by: jemcgui | last post by:
I've been building a site that has a quirk in it. It will display just as intended in IE but not firefox. The left "nav" div which is floating left will be forced down to the bottom of the page. The...
6
by: Jeremy | last post by:
I've got a floating div which becomes visible when a link is clicked. I want the div to be hidden when the user clicks anywhere on the page except for whithin the div. What is the best way to do...
4
dlite922
by: dlite922 | last post by:
This is just barely above my head when it comes to css. I have a div that needs to contain rows of floating divs, but I need each row not to wrap on to the next one and continue to go right. The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.