Jump to content

Page layout


GaryB

Recommended Posts

Put your content inside a wrapper div, apply a width to it, and set the right and left margin for that wrapper div to auto.

Thanks for the reply. That got me part way to where I want to be. I notice however, that the right margin 'grows' beyond the intended border. It does not wrap as I imagined it would. Should I instead set my margins to fixed setting to create the layout I am looking for?

Link to comment
Share on other sites

Setting margin at fixed width won't work, as you don't know what resolution your page will be viewed with.

 

Can we see your code - a link to the page would be best. What I said works, so you may have an error or some other issue going.

Link to comment
Share on other sites

These are the exact CSS settings the forum uses.

 

max-width:1100px;
min-width:700px;
overflow:auto;
width:90%;

 

That code centers the content area in the browser window, but allows the content width to change. The widest the content area can go is 1100px, and if you resize the browser smaller than that, it will change to a minimum width of 700px. This allows for different screen resolutions.

Link to comment
Share on other sites

These are the exact CSS settings the forum uses.

 

max-width:1100px;
min-width:700px;
overflow:auto;
width:90%;

 

That code centers the content area in the browser window, but allows the content width to change. The widest the content area can go is 1100px, and if you resize the browser smaller than that, it will change to a minimum width of 700px. This allows for different screen resolutions.

 

 

This is what centers it:

margin:0 auto;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...