revolutionwanted Posted February 16, 2007 Share Posted February 16, 2007 Hello everyone... could someone explain to me how to set a webpage in the middle of a page with a defined size. I am not sure if I am explaining this right, but you can check out this webpage to see what I mean. http://www.301-609-sold.com/I want something along these lines, with the background color on the left and right and the page in the middle.Any help will be appreciated. Thank you. Link to comment Share on other sites More sharing options...
Anders Moen Posted February 16, 2007 Share Posted February 16, 2007 That's simple XHTML:<div id="name">A lot of content will go here :)</div>CSS:body {text-align:center;}#name {width: 400px;margin: 0 auto;text-align: left;} Link to comment Share on other sites More sharing options...
revolutionwanted Posted February 16, 2007 Author Share Posted February 16, 2007 Thank you... I will see if I can figure this out. I have not worked on a website in years. My supervisor wanted a personal/ business site that is simple and easy to navigate.www.bonniebaldusgrier.comThat is the link, if you have any suggestions let me know.ALSO, how do you open a new page within another page? I want to display the links in the current page, below the head.Thank you. Link to comment Share on other sites More sharing options...
Anders Moen Posted February 16, 2007 Share Posted February 16, 2007 No problem :)But I would recommend not using tables because tables are to tabular data (td), like when you take something out of the database.Try to use div's instead, they give you much more freedom Link to comment Share on other sites More sharing options...
revolutionwanted Posted February 16, 2007 Author Share Posted February 16, 2007 No problem :)But I would recommend not using tables because tables are to tabular data (td), like when you take something out of the database.Try to use div's instead, they give you much more freedom Could you copy a bit of my code and show me the div as an example? Link to comment Share on other sites More sharing options...
Anders Moen Posted February 16, 2007 Share Posted February 16, 2007 Yeah, sure. To make a simple site like...this: | TOP HERE || LEFT MENU | CONTENT | RIGHT MENU | You simply use this:XHTML <div id="top">TOP HERE</div><div id="main"> <!-- I'm gonna put in several div's inside this, thanks to float: left; --><div id="left">LEFT MENU</div><div id="content">CONTENT</div><div id="right">RIGHT MENU</div></div> CSS body {text-align: center;}#top {width: 600px;margin: 0 auto;text-align: center;}#main {width: 600px;margin: 0 auto;text-align: left;}#left {width: 100px;float: left;}#content {width: 400px;float: left;}#right {width: 100px;float: left;} float: left;is to make it float to left. If you try to take that away, you'll see what happens Link to comment Share on other sites More sharing options...
LifeInBinary Posted February 16, 2007 Share Posted February 16, 2007 you could use an Iframe to open a page within another page. w3schools has a great tutorial with examples about it.hope that helps,LifeInBinary. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now