Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Cascading Style Sheets _ Background colour for centred page

Posted by: Brian Read Feb 23 2012, 01:43 PM

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

Posted by: pandy Feb 23 2012, 02: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.

Posted by: Brian Read Feb 24 2012, 05:03 AM

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

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)