p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: Professional CSS: Cascading Style Sheets for Web Design (http://p2p.wrox.com/book-professional-css-cascading-style-sheets-web-design-184/)
-   -   page 250 overlap footer by columns:solution ok? (http://p2p.wrox.com/book-professional-css-cascading-style-sheets-web-design/80184-page-250-overlap-footer-columns-solution-ok.html)

korinthos July 19th, 2010 03:33 PM

page 250 overlap footer by columns:solution ok?
I was confronted with the following problem which is described on page 250:

"Either solution will have the same effect whether the margins are applied to the footer div itself or
a container, the effect will be the same (see Figure 9-21). The footer will always appear between the two
sidebars, if not always below them.
To prevent any overlap from the absolutely positioned sidebars, you can place the footer div within the
main content block. However, when the height of the sidebar columns exceeds the height of the central
column, the footer will appear significantly higher than the bottom of the page.
This is a serious shortcoming of the absolute positioning model..."

Though later the solution of floating is suggested, I didn't find a way to do that in the book. So, I came up with this:
#footer {
background-color: #FDD;
border: 1px solid #C00;
float: right;
width: 100%;
text-align: center;
margin-left: 0px;
vertical-align: bottom;}

The footer is now situated at the bottom of the page, and is not being overlapped by or in between of the left and right column.

By the way, the "footer" div in the html file is only included in the "container" div.

Can someone tell me if this is the right solution to the problem?

Thanks in advance!

Sirajee January 31st, 2012 07:29 AM

Best way to books shopping deals
The Nook Color Tablet from Barnes and Noble is one such e-reader that was one of the first in bringing technology to the world of books. This device has many features that make it a great buy, at a very competitive price.

All times are GMT -4. The time now is 10:36 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.