/    Sign up×
Community /Pin to ProfileBookmark

Help for HTML code for page width please.

Hello, I know that the html data that you put on your page is kind of a no brainer regarding how the length, of the page can go on as long as you choose.

I need some html code that sets up the width of the page. The last website I had did this for me automatically.

What is the html code to set up the width of a web page. Thanks very much! Butch

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@NogDogApr 07.2006 — This should be done via CSS. Typically a set of <div>...</div> tags are used to contain the entire page contents, then a fixed or percentage width is assigned to that div in your stylesheet.
Copy linkTweet thisAlerts:
@felgallApr 07.2006 — As an example of how to set the content width - I use the following CSS on my site:

#content {margin:2% auto;width:94%;width:540px%;min-width:570px;max-width:850px;text-align:left;}

This centres the content with a width of 94% of the available width for Internet Explorer, a width of 540 pixels for webTV (which has a fixed width of 544 pixels). For other browsers it also uses 94% of the available width provided that the content doesn't end up narrower than 570 pixels or wider than 850 pixels in which case that width is used instead. This keeps the width of the content to an acceptable range in most browsers with only IE (before version 7) allowing the content to become too wide or too narrow).
Copy linkTweet thisAlerts:
@Butch1authorApr 07.2006 — Stephen, I've seen some of your other posts, you seem to know how to do a lot of this stuff. Thanks.

Someone else told me this...Maximum width = 560 pixels so pages print properly and various screen size and properties allow easy viewing. (That if I make the pages wider than 560 pixels, the pages won't print properly in some printers, or I can take the chance of cutting off the scroll bar in some browsers? Any truth to this? Thanks Butch.
Copy linkTweet thisAlerts:
@felgallApr 07.2006 — Unless the printer has been set up with very wide margins then I have found that somewhere in the low 700s will fit across an A4 page (letter sized paper is slightly wider so A4 is the limiting factor for international printing).

Also you can easily set up an alternate stylesheet with media=print" that redefines your page layout completely for printing. You could even create two complete sets of content for the page and hide one set on the screen and the other on the printer so that the printed page is completely different from what displays on the screen.
Copy linkTweet thisAlerts:
@Butch1authorApr 07.2006 — Thanks a lot, trying to avoid setting up any seperate print parameters for each page. If I use 700 you think that will cover all basis? If I use 700 do I still need to use your percentage numbers along with it? Butch
×

Success!

Help @Butch1 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.23,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...