Afficher un message
Vieux 28/03/2008, 22h21   #26
Ben C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Is it possible to vertical align in a div?

On 2008-03-28, Dave Rado <dave.rado@dsl.pipex.com> wrote:
> Hi Ben
>
> On 27 Mar, 22:43, Ben C <spams...@spam.eggs> wrote:
>
>> Moving things with position: relative is a bit risky, because in a sense
>> they don't really move, they just get rendered offset from their real
>> position as it were at the last minute. The space they occupy and their
>> effect on the positions and sizes of sibling and parent boxes is just
>> the same as if you didn't offset them.
>>
>> In this case, it might have been better to give body margin-top: 80px or
>> something instead, because that moves everything down properly.

>
> Except that doing that also moves the three icons above the document
> page down to below the top of the document page, when I try it - see
> my mock-up at http://tinyurl.com/2j68p3 (the mock-up showing how I
> want it to look is at http://tinyurl.com/3yqf5t). This was my original
> reason for setting the DocumentPage div to have a relative position.
>
> If I make div.TopOfPageIcons have an absolute position instead of a
> relative one (which does fix the above problem), it stops being
> centred.
>
> What do I need to change to my code at http://tinyurl.com/2j68p3 to
> make it look like http://tinyurl.com/3yqf5t ?


Just remove top: 76px from div.TopOfPageIcons.
  Réponse avec citation
 
Page generated in 0,06289 seconds with 9 queries