To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > ClientSide Technologies

ClientSide Technologies Discuss HTML/CSS/Javascript, and any other client-side technologies, here.

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-01-2006, 03:57 AM   #1
mikawhat
Senior Member
 
Join Date: Jun 2005
Posts: 361
[RESOLVED] Standard page width

Is there a way to specify a standard width for all of my pages? At the moment the width changes according to the contetns of the pages.
mikawhat is offline   Reply With Quote
Old 03-01-2006, 04:50 AM   #2
Weedpacket
Custom User Title™
 
Weedpacket's Avatar
 
Join Date: Aug 2002
Location: Rapid Offensive Unit "Foreign Object Damage"
Posts: 19,122
Use standard-sized paper? Don't go off the edge of the screen? I'm guessing that this has nothing at all to do with PHP; probably just a matter of using basic CSS to specify widths.
__________________
On two occasions I have been asked [by Members of Parliament], "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
Weedpacket is offline   Reply With Quote
Old 03-01-2006, 04:50 AM   #3
bogu
I code 4 beer ...
 
bogu's Avatar
 
Join Date: Nov 2002
Location: Romania
Posts: 1,743
Put you content in div tag like this:

PHP Code:
<div style="width:750px;">Content ....</div>
If u dont know html tags, use a html editor ...
__________________
/**
* The answer is so obvious, duh!
* It's like, whatever ...
*
* If your problem has been solved, PLEASE click the RESOLVED LINK under "Thread Tools"
*/
bogu is offline   Reply With Quote
Old 03-01-2006, 10:13 AM   #4
bpat1434
NMaOtBG
 
bpat1434's Avatar
 
Join Date: Oct 2004
Location: Around 255.255.255.0
Posts: 8,093
Yes, as bogu stated, you can specify the width. Now, be careful. Even though it defines the width of 750px, content can still overflow past the edge. The way to combat that is good CSS:

width: 750px;
overflow: auto;

With overflow set to auto the div won't be larger than 750px, and if content wants to be 800px wide, a scroll-bar at the bottom of the div will show up for the user to scroll. It's annoying, but it works. Helps guarantee with width will be the same.

You might also use a "wrapper" to wrap all the content in the site. The wrapper would be a basic <div></div> but with a specified with and overflow handeling to give you what you want. You can see this in action at patternet.com.

Honestly, if you're going to be specifiying the width of the page, just create the page in straight CSS (or convert it) as it will make things much easier, and later, when you say "Hey, I don't like 750px wide, I want 800px wide", it's a matter of changing one file (the CSS file) and the changes take place site-wide.....
bpat1434 is offline   Reply With Quote
Old 03-01-2006, 10:39 AM   #5
mikawhat
Senior Member
 
Join Date: Jun 2005
Posts: 361
that's great. thanks!
mikawhat is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 02:15 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.