School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,406 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,653 people online right now. Registration is fast and FREE... Join Now!




Div loses its background color

 

Div loses its background color

rachelalbert

23 Jun, 2009 - 08:14 PM
Post #1

New D.I.C Head
*

Joined: 11 Jun, 2009
Posts: 10

My wrapper div is set to have a white background but loses its color to become transparent (body background is visible) when elements are placed within it. Why?

User is offlineProfile CardPM
+Quote Post


gregwhitworth

RE: Div Loses Its Background Color

23 Jun, 2009 - 08:22 PM
Post #2

(this).problem + "sucks";
Group Icon

Joined: 20 Jan, 2009
Posts: 1,131



Thanked: 82 times
Dream Kudos: 50
Expert In: HTML, CSS, Web Design

My Contributions
uhm... need some code please. Make sure to:

code.gif
User is offlineProfile CardPM
+Quote Post

rachelalbert

RE: Div Loses Its Background Color

23 Jun, 2009 - 08:23 PM
Post #3

New D.I.C Head
*

Joined: 11 Jun, 2009
Posts: 10

QUOTE(rachelalbert @ 23 Jun, 2009 - 08:14 PM) *

My wrapper div is set to have a white background but loses its color to become transparent (body background is visible) when elements are placed within it. Why?



Did a bit of research and found the answer to my own question a few posts down the list. Need to specify the overflow as hidden. Background color returns. This problem shows up when elements within the div are floated. Hope this helps someone else.
User is offlineProfile CardPM
+Quote Post

noorahmad

RE: Div Loses Its Background Color

23 Jun, 2009 - 09:02 PM
Post #4

Webmaster
Group Icon

Joined: 12 Mar, 2009
Posts: 2,018



Thanked: 125 times
Dream Kudos: 1350
My Contributions
What Browser Are You Using?
code.gif
User is online!Profile CardPM
+Quote Post

rachelalbert

RE: Div Loses Its Background Color

23 Jun, 2009 - 09:10 PM
Post #5

New D.I.C Head
*

Joined: 11 Jun, 2009
Posts: 10

QUOTE(noorahmad @ 23 Jun, 2009 - 09:02 PM) *

What Browser Are You Using?
code.gif


Firefox and Safari
The color also disappeared in DW Live View.
User is offlineProfile CardPM
+Quote Post

noorahmad

RE: Div Loses Its Background Color

23 Jun, 2009 - 09:17 PM
Post #6

Webmaster
Group Icon

Joined: 12 Mar, 2009
Posts: 2,018



Thanked: 125 times
Dream Kudos: 1350
My Contributions
Could Please Past Your Code?
User is online!Profile CardPM
+Quote Post

RudiVisser

RE: Div Loses Its Background Color

24 Jun, 2009 - 12:35 AM
Post #7

.. does not guess solutions
Group Icon

Joined: 5 Jun, 2009
Posts: 1,872



Thanked: 137 times
Dream Kudos: 125
Expert In: PHP, MySQL, HTML, CSS, C#

My Contributions
noorahmad, this is solved. Read their post.

Thanks for the reasoning rachelalbert although I've never seen that issue before in any browser! smile.gif
User is offlineProfile CardPM
+Quote Post

noorahmad

RE: Div Loses Its Background Color

24 Jun, 2009 - 01:29 AM
Post #8

Webmaster
Group Icon

Joined: 12 Mar, 2009
Posts: 2,018



Thanked: 125 times
Dream Kudos: 1350
My Contributions
QUOTE
noorahmad, this is solved. Read their post.

Thanks for the reasoning rachelalbert although I've never seen that issue before in any browser! smile.gif

blink.gif
User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 10:53PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month