473,587 Members | 2,291 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Divs within Divs and backgrounds

I'm trying to have a background image in a div, then have several divs
within that div that have black backgrounds. The problem I'm finding
is that in Firefox and Safari, the first background image does not
show through on the other divs, it's as if the black background takes
over, and the space around it reverts to the body background, not the
background image of the containing div. Is there a way around this?

Jul 24 '07 #1
1 1679
Rik
On Tue, 24 Jul 2007 20:31:22 +0200, alice <al***@fearofdo lls.comwrote:
I'm trying to have a background image in a div, then have several divs
within that div that have black backgrounds. The problem I'm finding
is that in Firefox and Safari, the first background image does not
show through on the other divs, it's as if the black background takes
over, and the space around it reverts to the body background, not the
background image of the containing div. Is there a way around this?
Please give an url so we can see what happens.

With the little info you give I guess the div's in the 'main' div are
floated, which results in the parent div having no height whatsoever in
compliant browsers, but MSIE tries to enclose those divs with the parent
div.

This is easily tested for: add an element to the end of the parent div as
the last child, and give it a style="clear:bo th;". What happens then? If
that doesn't show as expected, an url is certainly required.

--
Rik Wasmus
Jul 24 '07 #2

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

Similar topics

0
2224
by: Olly | last post by:
I am using the following pure css layout with a header and footer: http://www.fu2k.org/alex/css/layouts/3Col_NN4_FMFM.mhtml The left column floats to the left of the main content (middle column). In the middle column I have 3 divs on top of each other, each of which needs to have a border. To get the borders to display correctly in...
12
6279
by: deko | last post by:
Is there any way to work around the blank space created by hidden divs? I'm trying to use a relatively postioned divs with show/hide behaviors to annotate an image. The divs show/hide onMouseOver/onMouseOut but leave a blank space on the page when hidden (the space where the divs would normally be). Is it possible to use z-indexing to put...
15
13489
by: red | last post by:
How do I center two side by side divs ? I've been writing css pages for a while but there's one thing tha still eludes me. I can center a div with margin auto. I can place two divs side by side with float. But I can't center two side by side divs. If I float them and give them auto margins, the auto margins are ignored. If I wrap the...
2
6062
by: Jamie Jackson | last post by:
I'd like to get a couple of divs centered in a container (let's say the container is a td, but it could also be a div). Here's what I have now (div2 and div3 are floated left): +---------------------------+ |+----+ +-------+ | ||div2| | div3 | | || | | | | || | | | | || | | ...
3
4656
by: Oddball | last post by:
I have a problem with the positioning of two divisions. They are containined within a content division in which all the page content happens (ie not the menus, etc.). The behavior I would like (and the behavior that happens in IE) is for the content division (from now on 'ConDiv') to resize with the content of either of the sub divisions...
2
1947
by: Guadala Harry | last post by:
Please follow my thinking here and tell me if I'm nuts or if this is a reasonable thing to do given the objective: I'd like to present 3 data values on an aspx page - each styled uniquely, and the total width to be limited to some arbitrary value (400px or so). Given that I'd like to limit the total width, I can't use a <td> because the...
0
2071
by: Jeb Hunter | last post by:
Well, how can I describe this succinctly? I have a page with DIVs that us background images to produce a border effect. It works perfectly well, but I want to make up (for now) 3 different border/background effects. Rather than duplicate the entire chunk of CSS 3 times, I thought "Gee, I should only have to specify the 3 backgrounds (all...
0
1614
by: stan | last post by:
I have internal links/jumps within divs. The divs have vertical scrolling. When a link is clicked, both the space within the div as well as the entire page vertically scroll. I would like to restrict the vertical scrolling in this situation (when an internal link is clicked) to the space within the div (the entire page should not scroll). ...
3
1820
by: Carl Gilbert | last post by:
Hi I am looking to convert a site from HTML to ASP.NET making use of CSS. I have tried various combinations but I can not seem to get the correct combination of div and CSS tag configurations. I have uploaded a screenshot (http://www.bwbfc.com/math/regions.jpg) of how the screen will be laid out. Firstly it is all cantered in the...
0
7915
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7843
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8205
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6619
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.