sunilvootkur Posted August 29, 2012 Report Share Posted August 29, 2012 Hi all, i am a beginner in web designing. i have created some websites using dreamweaver, but still i face lot of problems. when i zoom out in a browser the content is moving towards left side of the screen. can anyone help me out in finding out the problem in the HTML code. any kind of suggestions are welcome. Quote Link to comment Share on other sites More sharing options...
Andrea Posted August 29, 2012 Report Share Posted August 29, 2012 In order to help you find the problem in your HTML code, we kind of have to see it..... Can you post a link? Quote Link to comment Share on other sites More sharing options...
sunilvootkur Posted August 29, 2012 Author Report Share Posted August 29, 2012 can i know ur email id.....so that i can send you the whole site file. Quote Link to comment Share on other sites More sharing options...
Andrea Posted August 29, 2012 Report Share Posted August 29, 2012 You can post it here. Quote Link to comment Share on other sites More sharing options...
sunilvootkur Posted August 30, 2012 Author Report Share Posted August 30, 2012 file size is too much.....however, What code should be included to each div to align center for any screen resolution's??? Quote Link to comment Share on other sites More sharing options...
Wickham Posted August 30, 2012 Report Share Posted August 30, 2012 file size is too much.....however, What code should be included to each div to align center for any screen resolution's??? Without seeing your code, this usually works. CSS in a stylesheet:- #wrap { position: relative; width: ??px; margin: 0 auto; } where the width is enough for all your content and the margin: 0 auto will make the side margins equal which will center the page in a wide window. HTML markup:- <!doctype html> <head>........head section including stylesheet link or style tag enclosing styles......</head> <body> <div id="wrap"> .......all your page content....... </div><!--end of #wrap div--> </body> </html> You don't need to edit the other divs with your content (unless there's something wrong with your coding). Quote Link to comment Share on other sites More sharing options...
sunilvootkur Posted August 30, 2012 Author Report Share Posted August 30, 2012 thanks Quote Link to comment Share on other sites More sharing options...
Andrea Posted August 30, 2012 Report Share Posted August 30, 2012 #wrap { position: relative; width: ??px; margin: 0 auto; } Wickham, can you explain the 'relative' to me - I always just use the auto margin and no position. When/why would I want to make it relative? Quote Link to comment Share on other sites More sharing options...
Wickham Posted August 30, 2012 Report Share Posted August 30, 2012 Wickham, can you explain the 'relative' to me - I always just use the auto margin and no position. When/why would I want to make it relative? When someone posts without giving their code, you don't know if they have any position: absolute; divs, so I always add the position: relative to the code so that any position: absolute divs, if the person has any, will take positions from the corners of the position: relative #wrap div and retain positions inside the #wrap div when the #wrap div moves to center in wide window widths. You don't need position: relative if there are no position: absolute divs or other absolute elements inside the #wrap div. Quote Link to comment Share on other sites More sharing options...
Andrea Posted August 30, 2012 Report Share Posted August 30, 2012 Thanks for that - now I get it. Quote Link to comment Share on other sites More sharing options...
ripplenet Posted January 29, 2013 Report Share Posted January 29, 2013 Hello friends, Nice information for sharing with us. I am also use position: absolute; and margin:auto; It work properly and I am not face any zoom problem. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.