Css alignement

Fermé
nodapio Messages postés 601 Date d'inscription dimanche 23 novembre 2008 Statut Membre Dernière intervention 3 mai 2011 - 21 avril 2010 à 19:15
nodapio Messages postés 601 Date d'inscription dimanche 23 novembre 2008 Statut Membre Dernière intervention 3 mai 2011 - 25 avril 2010 à 11:17
Bonjour,
J'essaye de rendre mon css compatible avec IE 6!
Mon site utilise Wordpress et le sidebar de droite se retrouvait en bas à gauche du contenu, j'ai donc ajouté un float:right dans mon css mais maintenant il est en bas à droite ! Comment faire pour le mettre en haut à droite ?
Merci par avance pour votre aide.

4 réponses

arthezius Messages postés 3538 Date d'inscription jeudi 15 mai 2008 Statut Membre Dernière intervention 11 septembre 2016 475
22 avril 2010 à 06:44
Avec un peu de code et/ou un lien vers la page ça serai encore mieux.
Tu peux sinon essayer d'associer le float à un positionnement absolute.
float:right;
position:absolute;
top:0px;
0
nodapio Messages postés 601 Date d'inscription dimanche 23 novembre 2008 Statut Membre Dernière intervention 3 mai 2011 79
22 avril 2010 à 17:52
Oui :) j'ai essayé ton code mais toujours pareil !
Voici mon css:

body
{ background:#42afdc url(images/html-bg.gif) repeat-x;
  font:75%/170% Arial,Helvetica,sans-serif; }

body,form,h1,#nav ul,#nav ul li,.post,#sidebar ul,hr.clear,#wp-admin-bar ul,#wp-admin-bar ul li
{ padding:0; }

body,ul li,ul li,form,h1,#subnav ul,#subnav li,#sidebar ul,hr.clear,#wp-admin-bar,#wp-admin-bar ul
{ margin:0; }

body,h4,#subnav .page_item,#subnav li a:visited,#subnav li a,h2,h2 a:visited,h2 a
{ color:#333; }

a,.postdata a:hover,h2 a:hover
{ color:#44a1d0; }

a,h1 a:visited,h1 a,h1 a:hover,#nav ul li a,#nav li a:visited,#nav .current_page_item a,#nav li a:hover,#subnav .page_item,#subnav li a:visited,#subnav li a,#subnav li a:hover,.postdata a:visited,.postdata a,.postdata a:hover,h2 a:visited,h2 a,h2 a:hover,.page-nav a:visited,.page-nav a,.page-nav a:hover,.post-nav a:visited,.post-nav a,.post-nav a:hover,#footer a:visited,#footer a,#sidebar a:visited,#sidebar a
{ text-decoration:none; }

a:visited
{ color:#5eafd7; }

a:hover,#footer a:hover,#sidebar a:active,#sidebar a:focus,#sidebar a:hover
{ text-decoration:underline; }

p,#sidebar p
{ margin:0 0 15px; }

h4
{ font:bold 18px Arial,sans-serif; }

img,#searchform #s,#searchform #searchsubmit,#commentform #submit
{ border:none; }

ul,ol
{ margin:5px 0 15px; }

ul,ol,.post-nav .previous a
{ padding-left:20px; }

small,.postdata,#commentform small
{ font-size:90%; }

#page
{ background:url(images/main-bg.jpg) no-repeat center top; }

#wrapper
{ width:770px;
  position:relative; }

#wrapper,#calendar table
{ margin:0 auto; }

#header
{ height:120px; }

h1,.description,#searchform
{ position:absolute; }

h1
{ top:40px;
  font:normal 30px/100% "Trebuchet MS",Arial,sans-serif; }

h1,.description
{ left:25px; }

h1,h1 a:visited,h1 a,#nav .current_page_item a,#nav li a:hover,.post .date span,.page-nav a:visited,.page-nav a
{ color:#fff; }

h1 a:hover,.description,#nav ul li a,#nav li a:visited,.page-nav a:hover,.post-nav a:hover,#commentform #submit,#footer a:visited,#footer a,#sidebar a:visited,#sidebar a
{ color:#000; }

.description
{ top:77px;
  font:12px Arial,Helvetica,sans-serif; }

#searchform
{ top:0;
  right:0;
  background:url(images/searchform-bg.png) no-repeat right bottom;
  height:37px; }

#searchform,#sidebar
{ width:210px; }

#searchform #s
{ background:#fff url(images/form-field-bg.gif) no-repeat;
  height:17px;
  width:148px;
  margin:6px 5px 0 10px;
  padding:3px 7px 2px 5px; }

#searchform #s,.postdata,.postdata a:visited,.postdata a,.post-nav a:visited,.post-nav a,#commentform small,.commentlist small a:visited,.commentlist small a
{ color:#999; }

#searchform #searchsubmit
{ background:url(images/search-btn.png) no-repeat left top;
  height:24px;
  width:24px;
  text-indent:-999%;
  line-height:1px;
  margin-top:6px; }

#left-col
{ width:545px;
  margin-top:11px; }

#left-col,#nav ul li,#subnav li,.post .date,.post .title,.postdata .category,.previous-entries a,.post-nav .previous a,.left,img[align="left"],img.left
{ float:left; }

#nav
{ background:url(images/content-top-bg.png) no-repeat left top;
  height:26px; }

#nav ul,#subnav ul,#sidebar ul
{ list-style:none; }

#nav ul
{ margin:0 0 0 25px; }

#nav ul,#sidebar h3
{ font:bold 12px/100% Arial,Helvetica,sans-serif; }

#nav ul li
{ margin:0 1px 0 0; }

#nav ul li a
{ padding:5px 7px 6px 7px; }

#nav ul li a,.post .date span,.commentlist small,img[align="center"],img.center
{ display:block; }

#nav .current_page_item a,#nav li a:hover
{ background:#2e91c6 url(images/nav-item-hover.gif) repeat-x; }

#subnav
{ background:#ecebeb; }

#subnav ul
{ padding:3px 0 18px 5px;
  font:11px/100% Arial,Helvetica,sans-serif; }

#subnav li
{ border-right:1px solid #d8d8d8;
  padding:0 7px; }

#subnav .current_page_item a:visited,#subnav .current_page_item a,#subnav li a:hover
{ color:#3b9acc; }

#content
{ padding:25px 25px 15px 25px; }

#content,#adscontent
{ width:495px;
  background:#fff; }

#content,.post,.entry,.page-nav,.post-nav,h3#comments,h3#respond,.clear,hr.clear,.hidden,#wp-admin-bar
{ clear:both; }

#content,.post,#adscontent,.entry
{ overflow:hidden; }

.post .date
{ height:50px;
  width:45px;
  background:url(images/calendar.gif) no-repeat;
  font:normal 22px Arial,Helvetica,sans-serif;
  padding:0 2px 0 0;
  line-height:100%; }

.post .date,h3,#commentform label,#sidebar,#sidebar h3,#sidebar h3 a:visited,#sidebar h3 a
{ color:#666; }

.post .date,.post .date span,.center,#wp-admin-bar
{ text-align:center; }

.post .date span
{ height:16px;
  font:normal 11px Arial,Helvetica,sans-serif;
  padding-top:5px; }

.post .title,.previous-entries a
{ margin-left:10px; }

.post .title
{ width:438px; }

.postdata .category,#categories ul li
{ background:url(images/mini-category.gif) no-repeat; }

.postdata .category,.postdata .comments,#sidebar ul li
{ padding-left:18px; }

.postdata .comments,#recent-comments ul li
{ background:url(images/mini-comment.gif) no-repeat; }

.postdata .comments,.mini-add-comment,.next-entries a,.post-nav .next a,#sidebar,.right,img[align="right"],img.right
{ float:right; }

.mini-add-comment
{ background:url(images/mini-down-arrow.gif) no-repeat left center; }

.mini-add-comment,#sidebar ul li ul li
{ padding-left:12px; }

.entry
{ padding:10px 0 5px;
  background:inherit;
  padding:0 0 0; }

h2
{ margin:3px 0 2px;
  padding-bottom:4px;
  font:normal 150%/100% "Lucida Grande",Arial,sans-serif;
  border-bottom:dotted 1px #ccc; }

h3
{ margin:5px 0 5px;
  font:bold 110%/110% "Lucida Grande",Arial,sans-serif; }

.page-nav
{ background:url(images/navigation-bg.gif) no-repeat left center;
  height:21px; }

.previous-entries a
{ padding-left:10px;
  background:url(images/navigation-left.gif) no-repeat left center; }

.next-entries a
{ padding-right:10px;
  margin-right:10px;
  background:url(images/navigation-right.gif) no-repeat right center; }

.post-nav
{ padding-bottom:35px;
  margin-top:-15px;
  font-size:95%; }

.post-nav .previous a
{ background:url(images/post-nav-previous.gif) no-repeat left center; }

.post-nav .next a
{ padding-right:20px;
  text-align:right;
  background:url(images/post-nav-next.gif) no-repeat right center; }

h3#comments
{ background:url(images/comments.gif) no-repeat; }

h3#comments,h3#respond
{ padding-left:22px;
  font:normal 140%/120% Arial,Helvetica,sans-serif; }

h3#respond
{ background:url(images/respond.gif) no-repeat;
  margin:20px 0 0; }

#commentform
{ margin-top:10px; }

#commentform label,.commentlist cite
{ font-weight:bold; }

#commentform label
{ font-size:100%;
  padding-left:5px; }

#commentform input,#commentform textarea
{ font:110% Arial,Helvetica,sans-serif;
  padding:5px 3px 3px 7px;
  background:url(images/form-field-bg.gif) no-repeat; }

#commentform input
{ width:220px;
  border-top:1px solid #e6e6e6;
  border-right:1px solid #e2e2e2;
  border-bottom:1px solid #e2e2e2;
  border-left:1px solid #e6e6e6; }

#commentform textarea
{ width:480px;
  height:140px;
  border:solid 1px #e6e6e6; }

#commentform #submit
{ font:12px/100% Arial,Helvetica,sans-serif;
  background:url(images/submit-btn.gif) no-repeat top left;
  width:135px;
  height:25px;
  padding-bottom:6px;
  margin-left:355px; }

#commentform #submit:hover
{ background:url(images/submit-btn.gif) no-repeat bottom left; }

#commentform input[type="text"]:focus,#commentform textarea:focus
{ border:solid 1px #3b9acc; }

.authcomment
{ background:#b3ffcc !important; }

.commentlist
{ margin:10px 0;
  padding-left:45px;
  line-height:130%; }

.commentlist li
{ padding:5px 10px; }

.commentlist .alt
{ background:#f4f4f4; }

.commentlist cite
{ font-style:normal;
  font-size:110%; }

.commentlist cite,.commentlist cite a:visited,.commentlist cite a
{ color:#690; }

.commentlist small
{ margin-bottom:5px; }

.commentlist small,#footer
{ font-size:87%; }

#footer
{ background:url(images/content-bottom-bg.png) no-repeat;
  padding:10px 0 0 10px;
  color:#282828; }

#sidebar
{ line-height:160%; }

#sidebar h3 img
{ vertical-align:middle; }

#sidebar ul li
{ background:url(images/bullet-orange.gif) no-repeat; }

#sidebar ul li ul li
{ background:url(images/bullet-grey.gif) no-repeat; }

#archives ul li
{ background:url(images/mini-archive.gif) no-repeat; }

#recent-posts ul li
{ background:url(images/mini-page.gif) no-repeat; }

#links ul li
{ background:url(images/mini-blogroll.gif) no-repeat; }

#meta .rss
{ background:url(images/mini-rss.gif) no-repeat; }

#meta .login
{ background:url(images/mini-user.gif) no-repeat; }

#meta .check
{ background:url(images/mini-check.gif) no-repeat; }

#meta .wordpress
{ background:url(images/mini-wp.gif) no-repeat; }

#calendar td
{ padding:0 4px; }

img[align="center"],img.center
{ margin-left:auto;
  margin-right:auto; }

img[align="left"],img.left
{ margin:2px 10px 5px 0; }

img[align="right"],img.right
{ margin:2px 0 5px 10px; }

hr.clear,.hidden
{ visibility:hidden; }


#wp-admin-bar
{ align:center;
  padding:5px;
  background:#f9f9f9;
  border:1px solid #666; }

#wp-admin-bar ul li
{ list-style-type:none;
  display:inline;
  margin:0 10px; }

#sidebar {
float:left;
position:absolute;
top:0px;



Je ne vois vraiment pas où est le problème !
0
arthezius Messages postés 3538 Date d'inscription jeudi 15 mai 2008 Statut Membre Dernière intervention 11 septembre 2016 475
22 avril 2010 à 18:34
Tu aurai pas un lien vers ta page?

Sinon, il au moins le code html qui va avec ce CSS.
0
nodapio Messages postés 601 Date d'inscription dimanche 23 novembre 2008 Statut Membre Dernière intervention 3 mai 2011 79
22 avril 2010 à 19:08
Le site est en cours de création et je ne veux diffuser aucun lien pr le moment.
C'est un blog wordpress donc assez compliqué de te passer du code...
Tiens voilà ça, c'est le code qui injecte la sidebar:


<script type="text/javascript" src="http://monsite.com/wp-content/themes/itheme-1-1-fr/dbx.js"></script>
0
arthezius Messages postés 3538 Date d'inscription jeudi 15 mai 2008 Statut Membre Dernière intervention 11 septembre 2016 475
Modifié par arthezius le 23/04/2010 à 04:54
Oui mais ça me dit pas comment il est positionné dans ta page.
Tu peux me mettre le lien par MP si tu préfères.
0
nodapio Messages postés 601 Date d'inscription dimanche 23 novembre 2008 Statut Membre Dernière intervention 3 mai 2011 79
25 avril 2010 à 11:17
Je t'ai envoyé un mp, je ne sais pas si tu l'as reçu...
0