473,320 Members | 1,600 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,320 software developers and data experts.

div background with 2 floats not visible

ar
Oke,

Problem is:
background of the preceding div is not shown if 2 floats are active. If
1 float is active the background is seen.
IE and Firefox behave both the same, so it is my fault. But what is
wrong with this code?

Ar

html file is:
....
<div class="midden">
<div class="indexkolom1">
</div>
<div class="indexkolom2">
</div>
</div>

Css file is:
body{font: 0.7em/1.5em verdana,arial,helvetica,sans-serif;color:black;
margin-bottom:2em}

..midden{margin:1px 90px 0px 200px;background:url(achtergrond.jpg)
no-repeat #fdedee center}
..indexkolom2{float:right;width:48.5%}
..indexkolom1{float:left;width:48.5%}

Jan 15 '07 #1
1 2094
Hi,

At first, to better understand what happens you can add

div { border:1px black solid; }

No you can see at least some thing :-) The problem is that all your
divs has zero height. Write

<div class="indexkolom1">1</div>
<div class="indexkolom2">2</div>

Floating boxes expanded, but not the "midden". Now add new rules to
the .midden class:

overflow: auto;
width: 100%;

Refer to the http://www.quirksmode.org/css/clearing.html for more info.
- Alex.

Jan 16 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
by: Neal | last post by:
According to the CSS lint at http://htmlhelp.org/tools/csscheck/, "The shorthand background property is more widely supported than background-color." Can anyone point me to, or provide, information...
6
by: Michael Rozdoba | last post by:
I want to set a background colour on one level of headings, but have their width span only the text & a small amount of padding. I was styling display to inline to achieve this. Then I...
10
by: Roderik | last post by:
Hi, At: http://www.sylviastrijk.nl/examenklas/ In Internet Explorer we see the background of the wrapping div (#namenlijst) (with the columns (kolom 1, kolom 2, kolom 3) inside) as far as the...
7
by: john_aspinall | last post by:
Im making my first foray into table-less web site design and have run into a brick wall. This is the URLs: http://www.ainewmedia.co.uk/css_page.htm http://www.ainewmedia.co.uk/css_test.css ...
9
by: frizzle | last post by:
Hi there, I have a site where i display all kinds of thumbnails, (all 100 * 100px), the thumbs are links (surprise! ;) ). They link to a page where someone can order the picture. If ordered, a...
7
by: Ryaby21 | last post by:
Please help! i have everything set up with my CSS HTML layout and its all good. im using 3 divs at the moment and what i want to to do now is to add a new div with a background for the page. My...
3
by: kent | last post by:
Hi, For the code below, only "aaa" has a red background but "bbb" and "ccc" don't have it: <div style="background: red">aaa <div style="float:left">bbb</div> <div...
1
by: sewid | last post by:
Hi there! I've got a problem with no solution, I hope you might help me. I am writing a small tool with many buttons. Every button starts a thread and this thread starts something else, in the...
9
by: =?Utf-8?B?RnJhbmsgVXJheQ==?= | last post by:
Hi all I have a MDI Container Form, with one label control on the Background of this container form. When I now open a child form, this form is behind the label ... and this looks ugly ... :-))...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.