marquis Posted January 25, 2007 Share Posted January 25, 2007 i assume you do this in cssi want to make my website look like thishttp://www.bluechiphiltonhead.com/i want to make it to where when you resize the window instead of just making blank space to the right of the written stuff but do it evenly on both the left and right side the page i gave you is a pretty good example Link to comment Share on other sites More sharing options...
ChipChamp007 Posted January 25, 2007 Share Posted January 25, 2007 It should work if you make the whole page in the center. <html><head>...</head><body><center>...</center></body></html> Link to comment Share on other sites More sharing options...
Maggy Posted January 25, 2007 Share Posted January 25, 2007 what you need is a css... body{border-style:solid;margin-left:300px;margin-right:300px;} try this one.. Link to comment Share on other sites More sharing options...
ste Posted January 25, 2007 Share Posted January 25, 2007 the website you posted uses this code<div align="center"><center> Link to comment Share on other sites More sharing options...
roondog Posted January 25, 2007 Share Posted January 25, 2007 There is so many threads on this and i beleive the generally accepted way is to do this.CSS: body{text-align:center}.container{position:relative;margin: 0 auto;} html: <html><head><link type="text/css" rel="stylesheet" href="stylesheet.css" /></head><body><div class="container">YOUR WEBSITE HERE</div></body></html> replace stylesheet.css with the location of your stylesheet.I beleive this is correct unless someone knows otherwise. Link to comment Share on other sites More sharing options...
real_illusions Posted January 25, 2007 Share Posted January 25, 2007 umm...in risk of offending everyone..you're all wrong :)You need to do this:Make an outer div<html><head></head><body><div class="outer"><!-- the rest of the page here --></div></body></html>Then the CSS will be:.outer{margin:auto;}its that simple:blink:edit - seems roondog posted at the same time..but mines much simpler and works in the same way :) Link to comment Share on other sites More sharing options...
roondog Posted January 25, 2007 Share Posted January 25, 2007 I actually use .container{margin-left: auto;margin-right auto;} but i've seen alot of people post the other way. Link to comment Share on other sites More sharing options...
vchris Posted January 25, 2007 Share Posted January 25, 2007 but real_illusions what about IE!? You know how IE loves margin: 0 auto;? This won't align center in IE but it will in FF, NN and opera...Correct way again lolHTML <html><body><div id="container"><!-- Rest of page in here --></div></body></html> CSS body { text-align: center; } // centers div in IE#container { text-align: left; margin: 0 auto; } // left align text in div and centers in other browsers Thank you come again Link to comment Share on other sites More sharing options...
real_illusions Posted January 25, 2007 Share Posted January 25, 2007 hehe..my way seems to work for my ie as well...either my ie is messed up or i'm a magician:) Link to comment Share on other sites More sharing options...
vchris Posted January 25, 2007 Share Posted January 25, 2007 which IE is that? Link to comment Share on other sites More sharing options...
real_illusions Posted January 25, 2007 Share Posted January 25, 2007 i currently have ie6 still...and i have access to another computer at work occasionally which has ie7. And i have firefox (main browser), opera and netscape installed here at home. 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