June 9, 201016 yr I have been struggling to get my webpage centered. Usualy il set left and right margins to auto but this seems not to help. Can anyone show me where im going wrong. Im still learning css. Thank you. .............................................................................................................. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>home</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <!-- Save for Web Styles (home_theme.psd) --> <style type="text/css"> <!-- #Table_01 { left:0px; top:0px; width:1024px; height:1000px; position: absolute; } #index-01_ { position:absolute; left:0px; top:0px; width:1024px; height:11px; } #index-02_ { position:absolute; left:0px; top:11px; width:554px; height:49px; } #header_ { position:absolute; left:554px; top:11px; width:438px; height:26px; background-color:#2F2F31; } #index-04_ { position:absolute; left:992px; top:11px; width:32px; height:947px; } #index-05_ { position:absolute; left:554px; top:37px; width:438px; height:23px; } #index-06_ { position:absolute; left:0px; top:60px; width:15px; height:940px; } #home-btn_ { position:absolute; left:15px; top:60px; width:142px; height:65px; } #index-08_ { position:absolute; left:157px; top:60px; width:15px; height:210px; } #about-btn_ { position:absolute; left:172px; top:60px; width:142px; height:66px; } #index-10_ { position:absolute; left:314px; top:60px; width:14px; height:210px; } #contact-btn_ { position:absolute; left:328px; top:60px; width:140px; height:66px; } #index-12_ { position:absolute; left:468px; top:60px; width:14px; height:96px; } #store-btn_ { position:absolute; left:482px; top:60px; width:141px; height:66px; } #index-14_ { position:absolute; left:623px; top:60px; width:20px; height:96px; } #gallery-btn_ { position:absolute; left:643px; top:60px; width:139px; height:65px; } #index-16_ { position:absolute; left:782px; top:60px; width:210px; height:96px; } #index-17_ { position:absolute; left:15px; top:125px; width:142px; height:145px; } #index-18_ { position:absolute; left:643px; top:125px; width:139px; height:31px; } #index-19_ { position:absolute; left:172px; top:126px; width:142px; height:144px; } #index-20_ { position:absolute; left:328px; top:126px; width:140px; height:30px; } #index-21_ { position:absolute; left:482px; top:126px; width:141px; height:30px; } #index-22_ { position:absolute; left:328px; top:156px; width:30px; height:802px; } #content-head_ { position:absolute; left:358px; top:156px; width:621px; height:103px; background-color:#2F2F31; } #index-24_ { position:absolute; left:979px; top:156px; width:13px; height:748px; } #index-25_ { position:absolute; left:358px; top:259px; width:621px; height:256px; } #index-26_ { position:absolute; left:15px; top:270px; width:6px; height:634px; } #sidebar-body_ { position:absolute; left:21px; top:270px; width:301px; height:338px; background-color:#2F2F31; } #index-28_ { position:absolute; left:322px; top:270px; width:6px; height:688px; } #content-body_ { position:absolute; left:358px; top:515px; width:621px; height:337px; background-color:#2F2F31; } #index-30_ { position:absolute; left:21px; top:608px; width:301px; height:7px; } #adsense-container_ { position:absolute; left:21px; top:615px; width:301px; height:251px; background-color:#2F2F31; } #index-32_ { position:absolute; left:358px; top:852px; width:621px; height:52px; } #index-33_ { position:absolute; left:21px; top:866px; width:301px; height:38px; } #sitemap-container_ { position:absolute; left:15px; top:904px; width:129px; height:28px; background-color:#2F2F31; } #index-35_ { position:absolute; left:144px; top:904px; width:178px; height:54px; } #index-36_ { position:absolute; left:358px; top:904px; width:334px; height:54px; } #footer-links_ { position:absolute; left:692px; top:904px; width:300px; height:29px; background-color:#2F2F31; } #index-38_ { position:absolute; left:15px; top:932px; width:129px; height:26px; } #index-39_ { position:absolute; left:692px; top:933px; width:300px; height:25px; } #footer-body_ { position:absolute; left:15px; top:958px; width:978px; height:29px; background-color:#2F2F31; } #index-41_ { position:absolute; left:993px; top:958px; width:31px; height:42px; } #index-42_ { position:absolute; left:15px; top:987px; width:978px; height:13px; } --> </style> <!-- End Save for Web Styles --> </head> <body style="background-color:#FFFFFF;"> <!-- Save for Web Slices (home_theme.psd) --> <div id="Table_01"> <div id="index-01_"> <img id="index_01" src="images/index_01.png" width="1024" height="11" alt="" /> </div> <div id="index-02_"> <img id="index_02" src="images/index_02.png" width="554" height="49" alt="" /> </div> <div id="header_"></div> <div id="index-04_"> <img id="index_04" src="images/index_04.png" width="32" height="947" alt="" /> </div> <div id="index-05_"> <img id="index_05" src="images/index_05.png" width="438" height="23" alt="" /> </div> <div id="index-06_"> <img id="index_06" src="images/index_06.png" width="15" height="940" alt="" /> </div> <div id="home-btn_"></div> <div id="index-08_"> <img id="index_08" src="images/index_08.png" width="15" height="210" alt="" /> </div> <div id="about-btn_"></div> <div id="index-10_"> <img id="index_10" src="images/index_10.png" width="14" height="210" alt="" /> </div> <div id="contact-btn_"></div> <div id="index-12_"> <img id="index_12" src="images/index_12.png" width="14" height="96" alt="" /> </div> <div id="store-btn_"></div> <div id="index-14_"> <img id="index_14" src="images/index_14.png" width="20" height="96" alt="" /> </div> <div id="gallery-btn_"></div> <div id="index-16_"> <img id="index_16" src="images/index_16.png" width="210" height="96" alt="" /> </div> <div id="index-17_"> <img id="index_17" src="images/index_17.png" width="142" height="145" alt="" /> </div> <div id="index-18_"> <img id="index_18" src="images/index_18.png" width="139" height="31" alt="" /> </div> <div id="index-19_"> <img id="index_19" src="images/index_19.png" width="142" height="144" alt="" /> </div> <div id="index-20_"> <img id="index_20" src="images/index_20.png" width="140" height="30" alt="" /> </div> <div id="index-21_"> <img id="index_21" src="images/index_21.png" width="141" height="30" alt="" /> </div> <div id="index-22_"> <img id="index_22" src="images/index_22.png" width="30" height="802" alt="" /> </div> <div id="content-head_"></div> <div id="index-24_"> <img id="index_24" src="images/index_24.png" width="13" height="748" alt="" /> </div> <div id="index-25_"> <img id="index_25" src="images/index_25.png" width="621" height="256" alt="" /> </div> <div id="index-26_"> <img id="index_26" src="images/index_26.png" width="6" height="634" alt="" /> </div> <div id="sidebar-body_"></div> <div id="index-28_"> <img id="index_28" src="images/index_28.png" width="6" height="688" alt="" /> </div> <div id="content-body_"></div> <div id="index-30_"> <img id="index_30" src="images/index_30.png" width="301" height="7" alt="" /> </div> <div id="adsense-container_"></div> <div id="index-32_"> <img id="index_32" src="images/index_32.png" width="621" height="52" alt="" /> </div> <div id="index-33_"> <img id="index_33" src="images/index_33.png" width="301" height="38" alt="" /> </div> <div id="sitemap-container_"></div> <div id="index-35_"> <img id="index_35" src="images/index_35.png" width="178" height="54" alt="" /> </div> <div id="index-36_"> <img id="index_36" src="images/index_36.png" width="334" height="54" alt="" /> </div> <div id="footer-links_"></div> <div id="index-38_"> <img id="index_38" src="images/index_38.png" width="129" height="26" alt="" /> </div> <div id="index-39_"> <img id="index_39" src="images/index_39.png" width="300" height="25" alt="" /> </div> <div id="footer-body_"></div> <div id="index-41_"> <img id="index_41" src="images/index_41.png" width="31" height="42" alt="" /> </div> <div id="index-42_"> <img id="index_42" src="images/index_42.png" width="978" height="13" alt="" /> </div> </div> <!-- End Save for Web Slices --> </body> </html>
June 9, 201016 yr Try changing this #Table_01 { left:0px; top:0px; width:1024px; height:1000px; position: absolute; } To this #Table_01 { width:1024px; height:1000px; margin:0 auto; position: relative; } You do realise though, that you have no real content on that page. What are search engines going to read?
June 9, 201016 yr Author that worked great, thanks. But there is a margin at the top even though it is set as 0 with the code you supplied. How can i get it to the very top of the page. There is no content yet as i have not added any, this is simply the frame. Thank you
June 9, 201016 yr that worked great, thanks. But there is a margin at the top even though it is set as 0 with the code you supplied. How can i get it to the very top of the page. There is no content yet as i have not added any, this is simply the frame. Thank you Oh ok, sorry You should use a reset. http://meyerweb.com/...reset-reloaded/
Create an account or sign in to comment