Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

html document width

Posted on 2009-07-06
6
424 Views
Last Modified: 2012-08-14
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..
0
Comment
Question by:kuntilanak
6 Comments
 
LVL 9

Expert Comment

by:AsishRaj
ID: 24790902
0
 
LVL 9

Expert Comment

by:AsishRaj
ID: 24790926
can you post your code so that we can help you with that piece of code.
0
 
LVL 20

Expert Comment

by:ddayx10
ID: 24790954
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';
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 9

Accepted Solution

by:
Rahul Goel ITIL earned 500 total points
ID: 24791254
Create a Div tag
<div width="600" style="background-image(url(someimage.gif))">
</div>
0
 

Author Comment

by:kuntilanak
ID: 24791320
the site is only a page so I am not using any .css file.
0
 
LVL 9

Expert Comment

by:AsishRaj
ID: 24791330
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.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Check number of row prior to displaying gridview 10 62
Hide un-named HTML Label with CSS 14 36
Where does legacy ASP.NET initialize language? 2 22
Search Item in Table 2 19
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question