Afficher un message
Vieux 18/03/2008, 19h32   #5
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-18, Dave Rado <dave.rado@dsl.pipex.com> wrote:
> Hi Ben
>
> On 17 Mar, 17:09, Ben C <spams...@spam.eggs> wrote:
>
>> Vertical-align doesn't apply to blocks (like divs).
>>
>> But you can set it on the imgs inside the divs if you want.

>
> I tried your suggestion but must be doing something wrong. See my mock-
> up at http://tinyurl.com/2qh2vy. Can you see what I'm doing wrong?
>
>
>> Or set img
>> to display: block which I think is more appropriate here.

>
> I tried this suggestion as well but again, I must be doing something
> wrong. See my mock-up at http://tinyurl.com/2rzobt. Can you see what
> I'm doing wrong?


You've got three different divs, two of which are absolutely positioned.

Vertical-align on the images is only going to align them if they're on
the same line, which means (at least) all in the same block box.

> Perhaps I should explain that I am trying hard to understand the more
> complex parts of css but am finding it a real culture shock, having
> learnt my html in the early 90x, when everyone used tables, and then
> moved away from web development for several years, and I am now having
> to build a complex website and as I say am finding the change from
> using tables for layout to using css a real culture shock and a huge
> learning curve. I don't need convincing of the benefits of the change,
> but I need lots of hand holding.


Best to say exactly what you are trying to do with the three images in
the first place from the top.
  Réponse avec citation
 
Page generated in 0,05976 seconds with 9 queries