Help - Search - Members - Calendar
Full Version: Background colour for centred page
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
Brian Read
Hi

I have a site:

http://iea.goldendome.org.uk

I want to set the central page background to a light colour, but when I enter a background colour or background image, it fills the whole browser window, not just the central page area.

Any ideas?

cheers

Brian
pandy
The background of BODY often color the whole canvas. Wrap everything in a DIV instead and apply your styling to that. I.e. move the id and the inline style from BODY to the DIV

Inches is a unit for print. Better not use it on the web.
Brian Read
QUOTE(pandy @ Feb 23 2012, 07:14 PM) *

The background of BODY often color the whole canvas. Wrap everything in a DIV instead and apply your styling to that. I.e. move the id and the inline style from BODY to the DIV

Inches is a unit for print. Better not use it on the web.


yes, that worked very well, many thanks, also for the heads up on the inches - I'd wondered why the padding was so wide - changed to px now.

cheers

Brian
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.