|
Posted by vincent.marguerit on 07/24/07 15:43
On 24 juil, 15:28, "rf" <r...@invalid.com> wrote:
> <vincent.margue...@gmail.com> wrote in message
>
> news:1185283011.619352.252970@k79g2000hse.googlegroups.com...
>
> > Hi,
>
> > I am working on a page where there must be some text to the right of
> > an image.
> > This is how this must look like:
> >http://boxfly.free.fr/tmp/photo_preview/photo_border.jpg
>
> > At this time I could have done this:
> >http://boxfly.free.fr/tmp/photo_preview/photo.html
>
> > To the right of the picture, I don't find a way to display the part of
> > the text with the grey background.
>
> > Does anyone know how to do this with <div> ?
>
> Float the image left. If you want the nice borders then enclose the image in
> a div, floated left, and style the div to taste.
>
> Don't use absolute positioning, as in your latest incarnation. It *will*
> break when somebody changes font size or something.
>
> Also, don't try to make the font size 75% of what I like or I *will*
> increase my font size. Your CSS is way too complex as well. You don't need
> to specify all those default properties.
>
> --
> Richard.
Sorry man but I didn't really understand :(
What is taste ?
The code we are talking about is:
<div style="padding: 14px;">
<div class="preview-photo-left">
<img src="photo_files/photo_demo.jpg" border="1">
</div>
<div class="preview-photo-download">
<b>Download Image</b>
</div>
With this CSS:
..preview-photo-left{
float: left;
padding: 0;
padding-left:16px; padding-top:18px;
width:50%;
}
..preview-photo-download{
float: left;
padding: 0;
padding-left:16px; padding-top:18px;
width:50%;
background-color: #cccccc;
}
Thanks,
Vincent.
Navigation:
[Reply to this message]
|