Link to home
Start Free TrialLog in
Avatar of kuntilanak
kuntilanakFlag for United States of America

asked on

html document width

I've set the document background in an .aspx page, however I want the page background only to be a specific width... how can I do that?? as of right now the background always fills the whole browser page..
Avatar of AsishRaj
AsishRaj
Flag of Fiji image

can you post your code so that we can help you with that piece of code.
Have to set the <body> width. Your reference to setting "document background" makes me think JavaScript is in play here, but ??

CSS:
<body style="background-image(url(someimage.gif)); width:760px; margin:0px auto;">

JavaScript:
document.body.style.width = '760px';
ASKER CERTIFIED SOLUTION
Avatar of Rahul Goel
Rahul Goel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kuntilanak

ASKER

the site is only a page so I am not using any .css file.
you dont have to use a external Css file. You can have it one page and you can use any of the above mentioned methods to suit your need.