PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.CSS > Horizontal navigation list
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Horizontal navigation list

Réponse
 
LinkBack Outils de la discussion
Vieux 15/03/2008, 12h08   #1 (permalink)
François de Dardel
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Horizontal navigation list

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?

Thanks in advance for any hints

  Réponse avec citation
Vieux 15/03/2008, 17h34   #2 (permalink)
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
Vieux 15/03/2008, 22h50   #3 (permalink)
François de Dardel
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Horizontal navigation list

On 2008-03-15 17:34:21 +0100, Ben C <spamspam@spam.eggs> said:

> 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.


Thank you Ben for your precise and informative reply. I will take option 4.

--
http://dardel.info/
Remove both fourteens in your direct replies
Enlever les deux quatorze pour m'écrire

  Réponse avec citation
Vieux 15/03/2008, 23h24   #4 (permalink)
Jonathan N. Little
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Horizontal navigation list

François de Dardel wrote:
> On 2008-03-15 17:34:21 +0100, Ben C <spamspam@spam.eggs> said:
>


>> Option 4 is do nothing-- I think the buttons look fine the way they are
>> with different widths.

>
> Thank you Ben for your precise and informative reply. I will take option 4.
>


Also the easiest to implement!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 04h01.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09563 seconds with 12 queries