peterpachner Posted March 23, 2009 Share Posted March 23, 2009 Can't find my way around for a little thing. I have dreamweaver and want to make me a little site www.worldhealthissues.eu . I would like make frames and to have a fix with of the webpages like the old Yahoo pages. What is the HTML instruction to center a page, and for example a 800 pixcel wide page. I type all kinds of search words like page width, page centering, page layout etc. in the w3school search field but can't find what I am looking for. I must be using the wrong language. Can you help me to get to the right place? Thanks and best regards Link to comment Share on other sites More sharing options...
smerny Posted March 23, 2009 Share Posted March 23, 2009 use the style="text-align: center" for the <body> and then contain your content within a <div> with the style="width: 800px; margin: 0 auto; position:relative"is that what you are looking for? Link to comment Share on other sites More sharing options...
peterpachner Posted March 23, 2009 Author Share Posted March 23, 2009 use the style="text-align: center" for the <body> and then contain your content within a <div> with the style="width: 800px; margin: 0 auto; position:relative"is that what you are looking for?That is already something. I get a nice image in DW design mode but in my IE I am just having a blank page. Here is the code<html><head><title>index</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><bodystyle="text-align: center"<div style="width: 800px; margin: 0 auto; position:relative"><frameset rows="160,*" cols="80" framespacing="0" frameborder="NO" border="0" > <frame src="top.html" name="topFrame" noresize > <frameset rows="*" cols="130,500" framespacing="0" frameborder="NO" border="0"> <frame src="left.html" name="leftFrame" > <frame src="main.html" name="mainFrame" frameborder="no" noresize marginwidth="0" marginheight="80"> </frameset></frameset><noframes></noframes></body></html> Link to comment Share on other sites More sharing options...
smerny Posted March 23, 2009 Share Posted March 23, 2009 <bodystyle="text-align: center"><div style="width: 800px; margin: 0 auto; position:relative">you were missing the end of the body tag Link to comment Share on other sites More sharing options...
peterpachner Posted March 23, 2009 Author Share Posted March 23, 2009 <bodystyle="text-align: center"><div style="width: 800px; margin: 0 auto; position:relative">you were missing the end of the body tagThanks, now it workes nicely, but it is still not centered like most pages. I have tried to create all new, copy from here and there. Just made it worse. The following code gives a good result except not centered. Any suggestion? Best regards<html><head><title>index</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><div style="text-align: center" /div><div style="width: 800px; margin: 0 auto; position:relative" /div><frameset rows="150,*" cols="80" framespacing="0" frameborder="NO" border="0" > <frame src="top.html" name="top" noresize scrolling="No"> <frameset rows="*" cols="130,500" framespacing="0" frameborder="NO" border="0"> <frame src="left.html" name="leftFrame" > <frame src="main.html" name="mainFrame" frameborder="no" noresize marginwidth="0" marginheight="80"> </frameset></frameset><noframes></noframes></html> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.