Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Center a site built on a grid in GoLive 1

Status
Not open for further replies.

LibraLilith

Technical User
Jul 7, 2010
2
0
0
US
What if you already have your site done (about 20 or so pages) and now you want it to center in the browser? I built it on a grid with seperate elements. Do I have to start over? Does every page have to be redone?
 
Grids are absolute positioned. That means you can't make sure they are always centered. Web design does take some planning and if wanted your site centered you should have used a different method to lay it out.

Does every page have to be redone? That depends. Did you plan ahead and use a template to create your site pages? If yes, then all you have to do is change the template and GoLive will automatically redesign all the pages. If you didn't use a template, then yes, every page will have to be redone (Make a template, then copy/paste your content into it).
 
Thank you for your reply.

So how would you go about laying it out in order for it to be centered?
 
I've was thinking about centering your grid. If you created an outer div, with each grid area nested inside this div, you could use CSS to center the page. Using CSS give the outer div a width and center and make it's position relative. Now your grid will be absolute positioned within the centered outer div. The down side is i don't think you could do this with a WYSIWYG view. You'd have to switch to source view and write the code by hand.

If your going to redo the layout any method other then grids can easily be centered. Whether you use centered divs or tables the premise is the same. Center the outside most element.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top