July 13, 200917 yr Hi all, I'm confident i know how to centre a site horizontally within the browser but is there a simply way to centre the site vertically as well?? For example, say my webpage consists of an image 700px wide by 300px high. how do I get this image to float dead centre, regardless of how large the browser window is? Any help appreciated
July 13, 200917 yr Put everything inside a "wrapper div".... <style type="text/css"> #wrapper { width: 700px; height: 300px; margin: auto auto; } </style> <div id="wrapper">Content goes inside this div</div> That should do it... I've given the div auto margins to it will sit center! Sam
Create an account or sign in to comment