Afficher un message
Vieux 15/03/2008, 17h34   #2
Ben C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Horizontal navigation list

On 2008-03-15, François de Dardel <dardelf14@noos14.fr> wrote:
> Here is the page:
> http://dardel.info/museum/Museum1.html
>
> and here is the CSS (see navigation buttons at bottom of file):
> http://dardel.info/museum/style3.css
>
> Is there a way to make all nav buttons (at the bottom of the page) the
> same width?


Yes, but not without some caveats.

At the moment the list-items are display: inline to make them sit next
to each other the line.

But that means you can't set widths on them (because width doesn't apply
to things that are display: inline).

There are three other ways to make things line up next to each other
like that:

1. Float them
2. Make them display: inline-block
3. Use a table.

You can set widths on floats, inline-blocks or table cells.

But you can't centre floats, and inline-block doesn't work in Firefox
until version 3.

So that leaves a table, which won't make you any friends, but then you
seem to have already used tables quite a bit anyway so probably don't
care.

Option 4 is do nothing-- I think the buttons look fine the way they are
with different widths.
  Réponse avec citation
 
Page generated in 0,05873 seconds with 9 queries