Jump to content

Large space at the bottom of the page


solon

Recommended Posts

Hey guys i have a problem with one of my designs.

 

I have this page designed using html/css with only div's and at the bottom of the page it show a large empty space.

I read somewhere that the problem has to do with using

position:relative;

but i couldn't resolve the problem.

 

Any one has any ideas as to why this is happening?

 

By the way the code has passed the validation of w3c. (http://validator.w3.org/check?uri=http%3A%2F%2Fmkwebcy.com%2Falboro%2F)

 

This is the link to the test page so you can see the problem as well as the code: http://mkwebcy.com/alboro/

 

Thanks in advance

Solon

Link to comment
Share on other sites

You made your design more difficult than needed, you are using loads of min widths to compensate for that. This could have been done with just floats. position relative or absolute is not needed here.

Besides that your wrapper div, is smaller than the contents,.  have a read on overflow:hidden instead of setting a fixed height. Although that article is aimed at people using a clearfix, if you read it well, you can apply the same to your site.

Other wise your clients will call you within a week that they can make the page grow in height.

 

Link to comment
Share on other sites

No problem, If you take a pen and pencil, for the way this site is made.

you will notice you have 1 wrapper div Give it a fixed width and set overflow hidden.

Than place the content and use floats to put block on the same line and clear to start at a new line. this design could be done completely without  any positioning relative.

Link to comment
Share on other sites

Great, i did not know that could be done without positioning.

 

Although now that you mention it , it's logical.

 

I'll have to use margins and paddings for spacing between elements though right?

Link to comment
Share on other sites

well it depends on your design how much padding and margin you use. Just remember padding is to add extra background around an element and margin is for transparent space. It's all about the boxmodel and using float and clear the proper way

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.