|
Posted by Blinky the Shark on 03/21/07 02:59
mardi wrote:
> On Tue, 20 Mar 2007 15:38:49 +0000, Spartaco wrote:
>
>> Hi, this is a big problem for me I can't solve it: I have a <div>, and I
>> want the content of this div be vertically aligned in the middle by
>> applying CSS styles to the div tag... I've tried the vertical-align but
>> it does not work, the content is always at the top.
>>
>>
> Hi, I am but a humble student of the css-fu. I had the same issue arise in
> my studies and I did this:
>
> div.container { top: 0; left: 0; width: 100%; height: 100%; position:
> fixed; display: table }
>
> div.cell { display: table-cell; vertical-align: middle }
>
> then:
>
><div class="container">
><div class="cell">
><p>My Content</p>
></div></div>
>
> This works for vertical alignment in the latest versions of Firefox (I
> tried it in Linux and MS), Opera (Linux) and Konqueror (obvious :p) but it
> does not seem to work in IE 6 & 7.
I don't know anything about this site, but your findings seem to agree
with how it lists display:table:
http://www.quirksmode.org/css/display.html
--
Blinky RLU 297263
Killing all posts from Google Groups
The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html
Navigation:
[Reply to this message]
|