Jump to content

Holding DIV Tag


stublackett

Recommended Posts

Hi,

 

I've got a news page that could be X amount of pixels high, So what I need is an holding DIV tag that centres the page and allows X amount of pixels high. At the moment I have it set at 737px high as thats what the design was set at. But I need it to be extended as and when extra content is added.

 

My code at the moment is :

#wrapper {
position: relative;
margin: 0 auto;
margin-top: -14px;
width: 763px;
height: 737px;
border: solid 1px #FFCC00;
background-color: #FFFFFF;
}

#news {
position: absolute;
width: 755px;
height: auto;
left: 7px;
top: 159px;
}

 

The page I'm working on is : http://www.fpwebdesign.com/berwickrangers/test/

Link to comment
Share on other sites

Still no joy with that either Haku. I suppose the user could just adjust the height of the DIV Tag accordingly as and when they add news?

 

I've tried adding to #wrapper the following :

#wrapper {
position: relative;
margin: 0 auto;
margin-top: -14px;
width: 763px;
border: solid 1px #FFCC00;
background-color: #FFFFFF;
min-height: 712px;
max-height: 2000px;
}

How do people do this for pages that may overlap? There must be a way ???

Link to comment
Share on other sites

What I told you will do what you want. It sets the height at a minimum height, and if the amount of content added exceeds that height, the div will expand in height. If it's not working for you, then you have some other problem. Got a link?

 

Although I should add, IE6 doesn't like min-height, so if you are testing in that browser, it won't work. But there are workarounds for that if you google them.

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.