PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > alt.www.webmaster > Floats in IE6
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Floats in IE6

Réponse
 
LinkBack Outils de la discussion
Vieux 20/10/2007, 01h07   #1
sebzzz@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Floats in IE6

Hi,

I have this site (http://solutions-linux.org/) for which I have 3 DIVs
with absolute widths floating against each other. It renders fine
under IE7, Firefox, Opera and Safari, but the rightmost DIV collapses
on IE6.

I read that this is due to the fact that IE6 adds margins to DIVs or
something, but not sure really. I had this problem on an other site,
but was in too much of an hurry and just reduced to width of the one
containing the text so the 3 DIVs have a place for sure against each
other. But for this site, I would like to fix the problem for real
since the text column is already narrow enough. Do you people know
which CSS property do IE6 gives to DIVs? What to I have to change to
fix that?

It's hard to try things out since I'm on Linux and I don't have IE6
handy to test it out.


Thanks in advance.

  Réponse avec citation
Vieux 20/10/2007, 11h41   #2
Els
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Floats in IE6

sebzzz@gmail.com wrote:

> I have this site (http://solutions-linux.org/) for which I have 3 DIVs
> with absolute widths floating against each other. It renders fine
> under IE7, Firefox, Opera and Safari, but the rightmost DIV collapses
> on IE6.


Caused by the 50% left margin on the a.lien-nouvelles.

> It's hard to try things out since I'm on Linux and I don't have IE6
> handy to test it out.


Instead of using a 50% left margin, float it right, and then give it
the right padding in pixels that you want.
Then set clear:both on the hr below it.

Alternatively, wrap the a element in a p, and set text-align:right on
that paragraph.

The next problem is the hr itself: you want it to be centered, but IE6
shows it left aligned. This is because of the text-align:left on the
#content, the parent of #nouvelles.

Wrap it in a div with text-align:center, or set text-align:center on
the div#nouvelles, and then set text-align:left on the paragraphs and
headers.

--
Els http://locusmeus.com/
  Réponse avec citation
Vieux 20/10/2007, 15h53   #3
sebzzz@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Floats in IE6

Thanks a lot for this!

On Oct 20, 6:41 am, Els <els.aNOS...@tiscali.nl> wrote:
> seb...@gmail.com wrote:
> > I have this site (http://solutions-linux.org/) for which I have 3 DIVs
> > with absolute widths floating against each other. It renders fine
> > under IE7, Firefox, Opera and Safari, but the rightmost DIV collapses
> > on IE6.

>
> Caused by the 50% left margin on the a.lien-nouvelles.
>
> > It's hard to try things out since I'm on Linux and I don't have IE6
> > handy to test it out.

>
> Instead of using a 50% left margin, float it right, and then give it
> the right padding in pixels that you want.
> Then set clear:both on the hr below it.
>
> Alternatively, wrap the a element in a p, and set text-align:right on
> that paragraph.
>
> The next problem is the hr itself: you want it to be centered, but IE6
> shows it left aligned. This is because of the text-align:left on the
> #content, the parent of #nouvelles.
>
> Wrap it in a div with text-align:center, or set text-align:center on
> the div#nouvelles, and then set text-align:left on the paragraphs and
> headers.
>
> --
> Els http://locusmeus.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 09h11.


Édité par : vBulletin® version 3.7.3
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 ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08423 seconds with 11 queries