|
Posted by Blinky the Shark on 03/21/07 06:57
mardi wrote:
> On Wed, 21 Mar 2007 02:59:35 +0000, Blinky the Shark wrote:
>> 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
>
> Hi, thanks for the link, good info. I should have put in my original post
I just found that site today, in fact, doing some homework on the
display:table stlye. Looked like a good resource -- most of such sites
I've seen haven't made it past IE4 or so. :)
> that I found the code here:
>
> http://www.w3.org/Style/Examples/007/center.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]
|