Jump to content

div tag extends till the bottom of thepage


shah

Recommended Posts

Hi,

I am using the following CSS style.

.MainDiv {
width: 842px;
height: 731px;
background-color: #FFF;
position:absolute;
top:0px;
left:50%;
margin-left:-421px;
margin-bottom:10px;
}

as you can see, i have left some margin at the bottom .i.e 10px, but the div tag using this style still extends till the bottom of the page. i have used padding-bottom as well, but nothing seems to be working. i will appreciate if some one could help me in this issue.

 

Kind Regards

Syed Arif Ullah Shah

height: auto;

 

I've never used "auto" on "height" as it can give weird results.

 

I suggest you use Firefox and install these two plugins:

https://addons.mozilla.org/en-US/firefox/addon/60

https://addons.mozilla.org/firefox/addon/1843

 

That's Web Developer and Firebug respectively. Web Developer is pretty self explanatory when you use it but Firebug just places a small "bug" icon in the bottom-right of the browser - click to edit the CSS & HTML live on the page to see changes without having to make loads and loads of edits to source files etc.

height: auto;

 

I've never used "auto" on "height" as it can give weird results.

 

I suggest you use Firefox and install these two plugins:

https://addons.mozilla.org/en-US/firefox/addon/60

https://addons.mozilla.org/firefox/addon/1843

 

That's Web Developer and Firebug respectively. Web Developer is pretty self explanatory when you use it but Firebug just places a small "bug" icon in the bottom-right of the browser - click to edit the CSS & HTML live on the page to see changes without having to make loads and loads of edits to source files etc.

 

Thanks...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.