You are here: Re: background color not working as expected « HTML « IT news, forums, messages
Re: background color not working as expected

Posted by dorayme on 12/31/07 04:42

In article
<eb339fd7-b8d3-41c9-828e-e60957171e2a@w56g2000hsf.googlegroups.co
m>,
asaffos <roassaf@gmail.com> wrote:

> On Dec 26, 10:54 pm, dorayme <doraymeRidT...@optusnet.com.au> wrote:
> > In article
> > <72d52d3f-cfbe-4d69-8c04-a8b2a44fc...@i72g2000hsd.googlegroups.co
> > m>,
> >
> >  asaffos <roas...@gmail.com> wrote:
> > > Hi,
> >
> > > In the code below I have a certain color for the body, a different one
> > > for the content_body. For some reason although the DIV for the
> > > content_body has all of the pages content in it the background color
> > > appears in a certain part on the top of the page. Why is that? (the
> > > css is also below)
> >
> > > <!DOCTYPE html
> >
> > ...
> >
> > In what you supply, there is nothing in any of the divs, the
> > backgrounds are as you supplied them in your css. Perhaps you can
> > go to:
> >
> > http://netweaver.com.au/alt/assafos.html
> >
> > which is essentially your own mark up with some content added and
> > some more bg colours and colors to show your arrangement better.
> > What is it that *you* are puzzled by in this (as distinct from
> > quite a few things many might be puzzled by)
> >
> > --
> > dorayme
>
> Hi,
>
> Thanks for the help.
>
> I'm surprised from the face that the background color of the content
> body isn't inherited automaticlly in the other divs that are inside
> content body (for example right_col).
>
> Thanks

OK, fair enough. But it can make a bit of sense to you if you
form a picture of how floats are not "in" their containers in any
intuitive way.

If you go to:

http://netweaver.com.au/alt/assafos.html

and get rid of the wrapper (it seems irrelevant to *this*
surprise of yours) and get rid of all margins and paddings, get
rid of the backgrounds on the floats and stick distinctive
borders on all things and make the body color and background
distinctive, (and you may as well be rid of the right float too
for this exercise), and while we are at it, lets put in a clear
gif that takes up a lot of the width so that the float can't jut
in, you will see how the floats should not have *any* part of
themselves "housed" by the parent.

http://netweaver.com.au/alt/assafos1.html

The parent does not cover them with its height. They overflow.
They have a certain queer independence and and while they inherit
the color, their backgrounds are transparent. If you look at the
above url in IE6 it is easy to imagine why you might be
surprised. <g>

Messing about with your surprise has given me thoughts to expand
a few things in my hobby at http://netweaver.com.au/floatHouse/

(Please don't groan everyone... and Boji, stop yawning!

Time for a swim, this time it will be Bronte and back to get
ready for a NYE bash (at friends who cooks divine Greek) and the
fireworks at Glebe. This year, I understand, Glebe will be a
barge point for the Sydney harbour fireworks. Great! Happy New
Year everyone!)

--
dorayme

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация