I have an html homepage with a column of image and text that I cannot make stay centered when looking at the page in different screen resolutions. When looking at the homepage on smaller computer screens the column is centered but when looking at the page from a computer with a wide screen the column is way off center to the left. The page is www /rasta/ /pasta/ .net (remove spaces and slashes) Any help would be appreciated
before <table height="732" width="1195"> and </table> add div element like this <div style="width:735px;margin:0 auto"> <table height="732" width="1195" align="center"> .. .. .. </table> </div> HTML:
Align attribute for a div is deprecated. You should use margin property as the above poster mentioned. Use margin:0 auto for all your divs in your css. What this will do is give you a bottom and top margin as 0 pixel and automatically calculate the left and right margins depending on window size and center by giving equal margins.