diff --git a/ecrire/inc_documents.php3 b/ecrire/inc_documents.php3 index 0bfbb3df25848fa1e63aa4074d3d5a10a3d91bf0..b93801b3b2bcfd3becec45b35258cc3a3c75808e 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