From e4bbd7ea93b323b6a0f05f8d7ae7a16a0d5b4ce4 Mon Sep 17 00:00:00 2001 From: Fil <fil@rezo.net> Date: Sat, 9 Jul 2005 22:14:51 +0000 Subject: [PATCH] =?UTF-8?q?largeur=20de=20la=20div=20uniquement=20quand=20?= =?UTF-8?q?il=20le=20faut=20(Fran=C3=A7ois)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecrire/inc_documents.php3 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ecrire/inc_documents.php3 b/ecrire/inc_documents.php3 index 0bfbb3df25..b93801b3b2 100644 --- a/ecrire/inc_documents.php3 +++ b/ecrire/inc_documents.php3 @@ -320,13 +320,13 @@ function integre_image($id_document, $align, $type_aff) { } if ($align != 'center') { - $float = "float: $align;"; - if ($type_aff == 'IMG') { - $width = extraire_attribut($vignette, 'width'); - if ($width < 120) $width = 120; - $width = ' width: '.$width.'px;'; - } - $style = " style='$float$width'"; + // Largeur de la div = celle de l'image ; mais s'il y a une legende + // mettre au moins 120px + $width = extraire_attribut($vignette, 'width'); + if (strlen($txt) AND $width < 120) $width = 120; + $width = 'width: '.$width.'px;'; + + $style = " style='float: $align; $width'"; } return -- GitLab