Jump to content
Killersites Forums

website zoom problem's


Recommended Posts

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.

Link to post
Share on other sites

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).

Link to post
Share on other sites

 

#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?

Link to post
Share on other sites

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.

Link to post
Share on other sites
  • 4 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...