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

Résolu/Fermé
Dfault Messages postés 20 Date d'inscription mardi 6 mai 2014 Statut Membre Dernière intervention 17 avril 2020 - 6 mai 2014 à 23:10
animostab Messages postés 2829 Date d'inscription jeudi 10 mars 2005 Statut Membre Dernière intervention 11 novembre 2019 - 7 mai 2014 à 21:38
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 jeudi 10 mars 2005 Statut Membre Dernière intervention 11 novembre 2019 738
7 mai 2014 à 15:48
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 mardi 6 mai 2014 Statut Membre Dernière intervention 17 avril 2020
7 mai 2014 à 21:23
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 mardi 6 mai 2014 Statut Membre Dernière intervention 17 avril 2020
7 mai 2014 à 21:28
J'ai finalement trouvé la solution pour le texte, encore merci !
0
animostab Messages postés 2829 Date d'inscription jeudi 10 mars 2005 Statut Membre Dernière intervention 11 novembre 2019 738
7 mai 2014 à 21:38
ok tu peux mettre en résolu
0