A challenging Question

windows

Guest
Hi There.

I'm trying to figure out how I can use Valign (Percentage only) or something like it on element which is not a TD.

The thing is that I need it work in CSS1

Please help,
Thanks!Can't do that, but you can try something like the following:


#yourDIV {
height: 100px;
padding-top: 100px;
}I have to do it with percentage.

I've seen it done a while go by a friend of mine but I can't get hold of it or him so I'm trying to figure it out. I'm sure it's possible.

What else can I do?I'm not sure what your situation is, and have no basis for any assumptions (which may be considered a good thing), so helping you is kind of getting a little hard as something like this may work in one specific situation yet not another. In any case, the basic idea I mentioned in my previous post still applies with any unit. Maybe a little bit of a variation will work better, though.


#yourDiv {
position: absolute;
top: 50%;
height: 50%;
margin-top: -25%;
}
 
Back
Top