Placer le choix de la langue a cote de la barre de navigation

Résolu
Dfault Messages postés 20 Date d'inscription   Statut Membre Dernière intervention   -  
animostab Messages postés 2829 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,

Je souhaite placer mon formulaire 'choix de la langue' a cote de la barre de navigation. Mais le css ne reagit pas. Le #languages ne donne aucun resultat.

Voici ce que j'ai :

CSS :
<style type="text/css">

body, html {
margin: 0px;
padding: 0px;
background: white;
}

#nav {
padding: 0; margin: 0;
text-align: center;
}

#nav li {
display: inline;
list-style: none;
}

#nav a {
display:inline-block;
margin: 0 5px;
color: black;
font-family: calibri;
font-weight: normal;
text-decoration:none;
font-size: 16px;
}

#nav li:first-child a {
border-left: 0px solid #ccc;
}

#nav li a:hover {
color: red;
background-color: #white;
}

#languages {
display:inline;
position : float;
margin-right; 0%;
}
</style>

HTML/PHP :


<?php
require('_incl/lan_fr.php');
require('_incl/lan_nl.php');
require('_incl/lan_en.php');


$lan = isset($_GET['lan']) ? $_GET['lan'] : 'FR';
switch ($lan) {
case 'FR':
$TEXT = $TEXT_FR;
break;
case 'NL':
$TEXT = $TEXT_NL;
break;
case 'EN':
$TEXT = $TEXT_EN;
break;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type ="text/css" href="styles/styles.css" />
<title>no importance</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />

<meta name="keywords"
content="not important" />

<meta name="description"
content="not important" />
</head>
<body>
<div id="nav">
<ul>
<li class="navhome"><a href="page0.php"><img src="styles/images/logo.png" img border="0" alt="no importance" id="Logo"/></a></li>
<li><a href="page1.php"><?php echo($TEXT['p4']); ?></a></li>
<li><a href="page2.php">p3</a></li>
<li><a href="page3.php">p2</a></li>
<li><a href="page4.php">p1</a></li>
</ul>
</div>
<form id="languages">
<select onchange="window.location.href= this.form.URL.options[this.form.URL.selectedIndex].value" name="URL">
<option value="Page.php?lan=FR">Français</option>
<option value="Page.php?lan=NL">Nederlands</option>
<option value="Page.php?lan=EN">English</option>
</select>
</form>
</body>
</html>


Quelqu'un aurait-il la solution a mon problème.

Merci d'avance,


A voir également:

3 réponses

animostab Messages postés 2829 Date d'inscription   Statut Membre Dernière intervention   738
 
salut

essaie ca

#nav {
padding: 0; margin: 0;
text-align: center;
width:90%;
float:left;
}

#languages {
width:10%;
float:right;
}


0
Dfault Messages postés 20 Date d'inscription   Statut Membre Dernière intervention  
 
Cela fonctionne, merci beaucoup. Par contre maintenant c'est le texte qui reste coller au 'header' qui provient d'une autre page php et qui contient la barre de navigation et le choix de la langue. Je cherche donc la solution. Desole je commence seulement la programmation (HTML, PHP, CSS)
0
Dfault Messages postés 20 Date d'inscription   Statut Membre Dernière intervention  
 
J'ai finalement trouvé la solution pour le texte, encore merci !
0
animostab Messages postés 2829 Date d'inscription   Statut Membre Dernière intervention   738
 
ok tu peux mettre en résolu
0