troubles with vertical alignment
Hello everyone,
I'm back here, as I usually am every few months, with a problem I need help with.
This should be very very easy, I have been searching the web, these boards, but I cannot solve this.
Plese take a look at www.medinaconsultants.com
All I need to do is center the white horizontal area vertially on the page. That's it...
However, nothing I try works. Somebody please help!!!! :(
Re: troubles with vertical alignment
pad the css box at the top til you get it centered..
kai
Re: troubles with vertical alignment
that's what I was thinking, put some line breaks until it looks centered.
Re: troubles with vertical alignment
You can either use a Table or CSS. Tables you can just set the valign property and your away, but I don't think its validate HTML4 strict or XHTML.
The CSS way...I believe involves alot of hacks, as vertical-align is for use with Tables, not text.
Re: troubles with vertical alignment
do u mean make the white area in align center??
Re: troubles with vertical alignment
hi guys, thanks for the responses
adding linebreaks wont do the trick, as this will look different in different resolutions
can't really use tables (at least the way I tried), because i can't manage to set the table's height to 100% of the window. height="100%" doesn't seem to do the trick..
hmmm, what are hacks? what should i look into in css to take care of this?
thanks!
kenny_o: I mean align the white space vertically within the browser window
Re: troubles with vertical alignment
style="height:100%" should give it a height of 100... the height property only works for IE.
HTML Code:
<table style="height:100%">
<tr>
<td valig="middle">
MIDDLE ME!
</td>
</table>
Its not a great way of doing it, but it works. :)
As for CSS versions..
http://www.jakpsatweb.cz/css/css-ver...-solution.html
Theres a few different ways of doing it.
Re: troubles with vertical alignment
Aha, I use Firefox primarily, so that would explain why I had troubles with that.
Will look into that link.
Thanks!
Re: troubles with vertical alignment
This code will work in all broswers, just might take a bit of tweaking with the size to get it aligned in opera, firefox and IE and safari.
CSS CODE
Padding: 5px 0px 0px 0px;
I think this is right to pad the top out, if not play with all four of them to do so.
this wil lwork
ta
Kai
Re: troubles with vertical alignment
Yeah, but it won't work if the user has a different screen size though will it? 1024, 800,640... center is going to be different for each of them so you can't use a fixed measurement for the job.