News for hackers. Stuff that matters.
Re:Best Website Designs of 2010 by dawgr on Saturday January 01, 2011 @07:17AM (#2057550)
I read somewhere recently that most sites are using central layout now as opposed to fixed or liquid. I was looking for tutorials but I didn't find any, how would I go about making a central layout?
Re:Best Website Designs of 2010 by rossriley on Saturday January 01, 2011 @07:43AM (#2057564)
you just need a container, make the width of it about 980px and set the margin like so: #page_container {margin:0px auto;}
Re:Best Website Designs of 2010 by dawgr on Saturday January 01, 2011 @03:13PM (#2058281)
Alright thank you. Just one last question, within that 980px space, would the design be liquid or fixed? Maybe it sounds stupid but I'm kind of new to CSS.
Re:Best Website Designs of 2010 by rossriley on Saturday January 01, 2011 @07:49PM (#2058990)
That would be fixed then, you can subdivide that 980px space into columns but nothing inside will stretch beyond the boundaries. Eg. here's one of our sites: http://nxbus.co.uk

You can see that while there's a background image on the full page, all of the content is constrained to a 962px width container with the auto margins. This keeps it centred but with a fixed width.

Re:Best Website Designs of 2010 by dawgr on Sunday January 02, 2011 @08:02AM (#2059962)
Alright, thank you.