Jump to content
Sign in to follow this  
WooZ

Div's aren't resizing when they should

Recommended Posts

Hello all, a very basic question: I have a few div's in my page, but when i resize the window the div's just stay in their original position, but i need them to resize along with the whole page. I know it's a very stupid question but i'm just a beginner hey. :) Greets

Share this post


Link to post
Share on other sites

Absolute position your div using em/px instead of percentages. It is recommended the size of the div to have percentages, but not the area around it.

Share this post


Link to post
Share on other sites
I tried this, but as you can see here it still isn't like it should be. Any way how i can fix this?

It seems to be working for me. although I would suggest that if you're going to make a layout like this, you align everything to one side or the other because aligning with a percentage will look different in a bad way depending on the size of the bowser window. I played with it a little with my handy firefox web dev bar:
body{ background-color: #000000; background-image: url(back.jpg); background-repeat: no-repeat; background-position: top left;}div.content {position: relative;top: 130px;width: 525px;height: 60%;border: 1px dashed white;margin: 0;padding: 0;z-index: 4;}

dunno if that helps... probably dosent. if you want to keep it centered, then you'll probably have to break the image up into parts and not use any absolute positioning.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...
Sign in to follow this  

×
×
  • Create New...