Please support our Site Layout and Usability advertiser: Internet Marketing Services
![]() |
•
•
Join Date: May 2005
Posts: 494
Reputation:
Rep Power: 4
Solved Threads: 18
Well first off you would need to make your tables or divs in %'s and not actual pixel .
so
and NOT
100% will use entire width of screen... not sure if thats what you want.. but by using %'s you will adjust to the users res.
so
<center> <table width="100%"> </center>
and NOT
<center> <table width="550"> </center>
100% will use entire width of screen... not sure if thats what you want.. but by using %'s you will adjust to the users res.
With CSS, you set the margin of your main content block element to "auto", and it will automatically center, even if the content itself is given a width.
If your main content is contained in a div, you might give that div the class "container", and your CSS declaration might look like:
The margin says, make the top/bottom "0", and make the sides "automatic".
If your main content is contained in a div, you might give that div the class "container", and your CSS declaration might look like:
#container
{ position: relative;
width: 656px;
background: #ccc;
border: 15px solid #666;
margin: 0 auto;
padding-bottom: 5px;
}The margin says, make the top/bottom "0", and make the sides "automatic".
•
•
Join Date: Aug 2005
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
I dont understand this, The problem i am having is as stated, I downloaded a phpBB2 Forum theme, But the content, Images etc are all crammed into the left of the page. Is there anyway to make it centered on the page ? as said before like this site if you didnt have the blue navigation bar.
I have no idea where to start, The main problem isnt really the code, it is what page to start on, But if someone could answer both code and what page it would be great, if you can only answer one still answer i need all the help i can get thx
** EDIT **
Sorry i forgot to add that i know the problem is with the screen resolution, I run at 1024x768 and it is crammed to the left, but when i put my res to 800x600 it is centered and takes up the page. And btw ALL tables in every page is set to 100% in the width.
PLEASE HELP, I have been up for ages trying to get this working, :cry:
I have no idea where to start, The main problem isnt really the code, it is what page to start on, But if someone could answer both code and what page it would be great, if you can only answer one still answer i need all the help i can get thx
** EDIT **
Sorry i forgot to add that i know the problem is with the screen resolution, I run at 1024x768 and it is crammed to the left, but when i put my res to 800x600 it is centered and takes up the page. And btw ALL tables in every page is set to 100% in the width.
PLEASE HELP, I have been up for ages trying to get this working, :cry:
headache free method;
<div align="center"></div>
put your site between the tags. Make sure the <body> tag is outside of this.
Jared
<div align="center"></div>
put your site between the tags. Make sure the <body> tag is outside of this.
Jared
<doctypes> like strictXHTML should be avoided as I understand it but you are in fact 100% correct about the validation. I just tested it because you had me curious.
I make my previous statement based on an article I read at CSSCreator.com
Thanks sincerely for that XHTML tip on validation. I didnt know that.
Jared
I make my previous statement based on an article I read at CSSCreator.com
Thanks sincerely for that XHTML tip on validation. I didnt know that.
Jared
Jared,
No problem. I don't agree to avoid strict doctypes. In fact, I often code strict XHTML. It minimizies cross-browser issues. In fact, you should start with the strictest doctype, then if, and only if, you absolutey need some tag or property not in the strict doctype, should you seek an alternative.
For example, on some sites I use XHTML Transitional, only because I want to use the "target='_blank'" property in my hyperlinks.
No problem. I don't agree to avoid strict doctypes. In fact, I often code strict XHTML. It minimizies cross-browser issues. In fact, you should start with the strictest doctype, then if, and only if, you absolutey need some tag or property not in the strict doctype, should you seek an alternative.
For example, on some sites I use XHTML Transitional, only because I want to use the "target='_blank'" property in my hyperlinks.
Hey thanks tgreer, sure that makes sense;
I myself usually avoid it not because I want my code less strict but I too find that many of the CMS and Open-Source applications I build templates for actually work better with either transitional or simple HTML 4.0
You might find that article at CSSCreator of particular interest. I know it was well thought out and pretty informative. In fact anyone really looking for some good info on <doctype> can read some nice details here.
http://csscreator.com/css-forum/ftopic11242.html
I hope this helps
Jared
I myself usually avoid it not because I want my code less strict but I too find that many of the CMS and Open-Source applications I build templates for actually work better with either transitional or simple HTML 4.0
You might find that article at CSSCreator of particular interest. I know it was well thought out and pretty informative. In fact anyone really looking for some good info on <doctype> can read some nice details here.
http://csscreator.com/css-forum/ftopic11242.html
I hope this helps
Jared
![]() |
Other Threads in the Site Layout and Usability Forum
- Previous Thread: Dreamweaver Help-Posting Form to Server
- Next Thread: Can anyone suggest a Cheap or Free site builder?
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Linear Mode