Salut,

J'ai essayer de faire un menu horizontal ac la propriété float. J'ai un ptit pb ac les espacements des titres du menu.

Voir sur mon site : www.studio20.info

L'espace entre Accueil et Démarches et entre Démarches et Dazibao est le même, mais après les autres sont différents, comment mettre la mm taille d'espacement ? je n'arrive pas à trouver !

Merci de votre aide.

Voila mon fichier CSS :

body
{
	margin: 0px 0;
	padding: 0;
	text-align: center;
	font: 0.8em "Trebuchet MS", arial, sans-serif;
	background: #b7c6e8;
}

div#conteneur_global
{
	position: relative;
	width: 800px;
	margin: 0 auto;
	text-align: left;
	border: 1px solid #6e93e8;
	background: #fff;
}

dl {
 
position: absolute;
left: 570px;
top: 170px;
width: 210px;

}

dl, dt, dd {
margin: 0;
padding: 0;
}

dt {
height: 40px;
background: url(design/hauta.gif) top left no-repeat;
font-size: 1.3em;
font-weight: bold;
text-align: center;
}

dl {
background: url(design/basa.gif) bottom left no-repeat;
padding-bottom: 40px;
}

dd {
padding:0 20px 0 10px;
text-align: justify;
background: url(design/milieua.gif) top left repeat-y;
}

h1#header

{	height: 150px;
	background: url(design/header.jpg);
	<span>margin: 0;
}

h1#header a 
{
	width: 800px;
	height: 70px;
	display: block;
	position: relative;
	left: 50px;
	top: 15px;
}

h1#header a span
{
	display: none;
}


ul#menu
{
	height: 30px;
	margin: 0;
	padding: 0;
	list-style-type: none;
}

ul#menu li
{
	float: left;
	text-align: center;
}


ul#menu li a
{
	width: 80px;
	line-height: 25px;
	font: 0.8em Arial;
	font-weight: bold;
	letter-spacing: 1px;
	color: #ced5e5;
	display: block;
	text-decoration: none;
	margin: 0 5px;
}

ul#menu li a:hover
{
	color: #6e93e8;
}

div#contenu
{	
	padding: 0 270px 0 30px;
}


div#contenu h2
{
	text-align: left;
	padding-left: 25px;
	line-height: 25px;
	font-size: 1.4em;
	color: #6e93e8;
}

div#contenu h3
{
	text-align: left;
	padding-top: 50px;
	padding-left: 25px;
	line-height: 25px;
	font-size: 1.2em;
	color: #F4893A;
	border-bottom: 1px solid #F4F23A;
}

div#contenu h4
{
	text-align: right;
	padding-top: 20px;
	padding-left: 25px;
	line-height: 25px;
	font-size: 1.2em;
	color: #b7c6e8;
	border-bottom: 1px solid #bdbdbf;
}

div#contenu p
{
	text-align: justify;
	text-indent: 2em;
	line-height: 1.7em;
	color: #6e93e8;
	font-weight: bold;
	font-size: 1em;
}

div#contenu a
{
	color: #9bd2;
}

div#contenu a:hover
{
	color: #9bd2;
}


pre
{
	overflow: auto;
	background: #dea;
	border: 2px solid #9b2;
	padding: 5px 0 0 5px;
	font-size: 1.2em;
}

* html pre
{

	width: 800px;
}

pre span.comment
{
	color: #b30000;
}

p#footer
{
	margin:0;
	padding-right: 50px;
	line-height: 30px;
	text-align: center;
	color: #b7c6e8;
	font-size: 0.9em;
	font-weight: bold;
}

p#footer a
{
	color: #b7c6e8;
	text-decoration: none;
	
}


Smiley cligne
Modifié par fixyou (06 Dec 2005 - 10:27)
Bonjour,

Ce n'est pas un problème d'espace entre les liens. Mais d'espace à l'intérieur de ceux-ci.

Comme tes liens sont de largeur fixe (80px), le texte laisse plus ou moins d'espace à sa gauche et sa droite dans le lien selon sa longueur (CV prend moins de place que ACCUEIL).

Supprime le width: 80px.
Merci bcp aussi pour cette astuce, j'avais le même genre de problème.
Je mettais padding et margin o partout et pourtant j'avais encore de l'espace autour des mots.