473,398 Members | 2,404 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,398 software developers and data experts.

div background shows fine in IE but not in FF or Netscape

Hello,

i have a page where i have a white box centered on the screen. Now in IE
everything shows fine, but in FireFox and Netscape the background of the box
isn't white. But all the positioning is more or less OK.

This is the code of my page:

<div class="centraal">
<div class="whitebox">
<img src="images/top_bar.jpg">
<div class="menucontainer">
<div class="menukolom" id="menu">
<!-- in here is a <ul> with my menu, nothing special -->
</div>
<div class="menubottom">
</div>
</div>
<div class="contentbox">
<!-- in here i write my text -->
</div>
</div>
</div>
<div class="bottombar"><img src="images/bottom_bar.jpg"></div>
<div id="footer">
<div class="adresbalk">
<!-- here comes the address -->
</div>
</div>

and these are the different defenitions in my stylesheet

body {
background-color: #E3E3E3;
font-family: Arial;
font-size: 11px;
}

..whitebox {
background-color:#ffffff;
padding-top: 0px;
color:#425967;
}

..centraal {
background-color: #ffffff;
text-align: left;
border: 0px none;
margin-left:auto;
margin-right:auto;
padding: 0px;
width: 650px;
}

..bottombar {
width: 650px;
margin-left: auto;
margin-right: auto;
}

..contentbox {
font-family: Arial;
font-size: 0.95em;
color: black;
width: 510px;
float: right;
}

..menukolom {
padding: 5px;
line-height: 150%;
background-color: #C3D678;
font-family: Arial;
font-size: 1.05em;
font-weight: bold;
color: white;
width: 113px;
margin-left: 3px;
float: left;
}

..menubottom {
background: url(images/bottom_menukolom.gif) no-repeat bottom;
float: left;
width: 123px;
height: 82px;
margin-left: 3px;
}

..menucontainer {
width: 125px;
float: left;
margin-top: 3px;
}

does anyone have an idea what i might be doing wrong that causes the white
content not to be displayed in FF and Netscape?

Thx in advance!

Thomas

P.S. Page can be seen on http://www.techtransfer.ugent.be/voedingsproject/
Jul 21 '05 #1
3 5987
Els
Mr. T. wrote:
Hello,

i have a page where i have a white box centered on the screen. Now in IE
everything shows fine, but in FireFox and Netscape the background of the box
isn't white. But all the positioning is more or less OK.

This is the code of my page:
[snip superfluous part of message because URL is provided below]
does anyone have an idea what i might be doing wrong that causes the white
content not to be displayed in FF and Netscape? P.S. Page can be seen on http://www.techtransfer.ugent.be/voedingsproject/


Add a border to that box, and see why the background isn't displayed.

Hint: floats aren't seen by their parents, and boxes (parent elements)
don't automatically encompass them. You would need to add a clearing
element after the last content but before the closing tag of your
'white box'. For instance <br style="clear:both;">

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #2
Hi Els,

thx for the fast reply! the suggestion with the <br> and clear both works
fine!

just one thing that's still bugging me is why the borders aren't as nice as
in IE? In IE i managed to get a nice white border (to the right), but in FF
it doesn't show.

REgards,

Thomas

"Els" <el*********@tiscali.nl> schreef in bericht
news:1v*****************************@40tude.net...
Mr. T. wrote:
Hello,

i have a page where i have a white box centered on the screen. Now in IE
everything shows fine, but in FireFox and Netscape the background of the
box
isn't white. But all the positioning is more or less OK.

This is the code of my page:


[snip superfluous part of message because URL is provided below]
does anyone have an idea what i might be doing wrong that causes the
white
content not to be displayed in FF and Netscape?

P.S. Page can be seen on
http://www.techtransfer.ugent.be/voedingsproject/


Add a border to that box, and see why the background isn't displayed.

Hint: floats aren't seen by their parents, and boxes (parent elements)
don't automatically encompass them. You would need to add a clearing
element after the last content but before the closing tag of your
'white box'. For instance <br style="clear:both;">

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -

Jul 21 '05 #3
Els
Mr. T. wrote:
"Els" <el*********@tiscali.nl> schreef in bericht
news:1v*****************************@40tude.net...
Mr. T. wrote:
Hello,

i have a page where i have a white box centered on the screen. Now in IE
everything shows fine, but in FireFox and Netscape the background of the
box
isn't white. But all the positioning is more or less OK.

This is the code of my page:


[snip superfluous part of message because URL is provided below]
does anyone have an idea what i might be doing wrong that causes the
white
content not to be displayed in FF and Netscape?

P.S. Page can be seen on
http://www.techtransfer.ugent.be/voedingsproject/


Add a border to that box, and see why the background isn't displayed.

Hint: floats aren't seen by their parents, and boxes (parent elements)
don't automatically encompass them. You would need to add a clearing
element after the last content but before the closing tag of your
'white box'. For instance <br style="clear:both;">


thx for the fast reply! the suggestion with the <br> and clear both works
fine!

just one thing that's still bugging me is why the borders aren't as nice as
in IE? In IE i managed to get a nice white border (to the right), but in FF
it doesn't show.


That's a matter of widths and paddings/margins. In Opera for instance
the three red blocks form a straight block, but more to the right than
in IE, covering the right border of the white box, just like the last
red block does in Firefox. I haven't got time now to dive into your
code, but play a bit with the margins and paddings on those red boxes
and you'll likely be able to solve it. A quick peek showed boxes
floated to the right. Maybe you should put a container around the red
boxes, and have a right padding between that container and the
contentbox. Just maybe though, haven't looked into it much.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #4

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

Similar topics

4
by: erik | last post by:
Is it posssible to inherit the previous pages (parent pages) background image? Is there a script out there I could look at? Thanks
1
by: Justin | last post by:
Ok here is working code in IE, <td ID="TD1" width="478" height="553" background="images/GUYONDOC.JPG" valign="top">. . . </td> <a href="texana.htm"...
12
by: Stanimir Stamenkov | last post by:
Here are two cases regarding inline-level elements' line-height, padding and background, which I doesn't understand: <div style="background: black; color: white; line-height: 1.5">...
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...
11
by: Konrad Den Ende | last post by:
I have a function returning a string but the problem is that the color of it is blue which suits me well for some pages but not for others. Is it possible to "feel" what the color of the background...
2
by: Bill Borg | last post by:
Hello, I have CSS style LogoMain as follows: ..LogoMain { background-attachment: scroll; background-image: url(images\LogoCD.gif); background-position: left top;...
8
by: johkar | last post by:
I have two problems I cannot work out in the following tab code with Netscape 6. Problems are marked with all cap comments. One is that the background image is not shown in NS 6 (two places in...
11
by: Steve Kirkendall | last post by:
I need a work-around for an IE limitation, regarding fetching HTTP documents in the background. It takes a bit of explaining; please be patient... I'm working on an project that will run on an...
1
by: kmw | last post by:
Hi, Page is www.wapitiarchersofpa.com Issue is with the image at the top of the page which is set in css as a background image in the header class. Source shows <div class="header"></div> I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.