A <div> to the right of a image

Discussion in 'HTML' started by vincent.marguerit@gmail.com, Jul 24, 2007.

  1. Guest

    , Jul 24, 2007
    #1
    1. Advertising

  2. rf Guest

    <> wrote in message
    news:...
    > 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


    404.

    > 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> ?


    Yes, but I don't know exactly what you want. I can't see your "must look
    like".

    --
    Richard.
     
    rf, Jul 24, 2007
    #2
    1. Advertising

  3. Guest

    On 24 juil, 14:32, "rf" <> wrote:
    > <> wrote in message
    >
    > news:...
    >
    > > 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

    >
    > 404.
    >
    > > 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> ?

    >
    > Yes, but I don't know exactly what you want. I can't see your "must look
    > like".
    >
    > --
    > Richard.


    Sorry, I uploaded the content without the image. Now the picture is on
    the server:
    http://boxfly.free.fr/tmp/photo_preview/photo_border.jpg

    Vincent.
     
    , Jul 24, 2007
    #3
  4. rf Guest

    <> wrote in message
    news:...
    > 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.
     
    rf, Jul 24, 2007
    #4
  5. wrote:
    >
    > Sorry, I uploaded the content without the image. Now the picture is on
    > the server:
    > http://boxfly.free.fr/tmp/photo_preview/photo_border.jpg
    >

    just an OT rant: the unit 'dpi' is meaningless for digital images. A
    pixel is a pixel and the only unit that will tell me something about the
    size of the image. Or have you ever seen that a digital-camera is being
    advertised as producing '300dpi' images? The amount of pixels on a
    CCD-sensor is measured in MP.

    bernhard


    --
    www.daszeichen.ch
    remove nixspam to reply
     
    Bernhard Sturm, Jul 24, 2007
    #5
  6. Guest

    On 24 juil, 15:28, "rf" <> wrote:
    > <> wrote in message
    >
    > news:...
    >
    > > 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.
     
    , Jul 24, 2007
    #6
  7. Bergamot Guest

    Bergamot, Jul 24, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vince C.
    Replies:
    1
    Views:
    2,116
    Vince C.
    Jul 1, 2003
  2. K Viltersten

    <div ... /> and <div ...></div>

    K Viltersten, Mar 30, 2009, in forum: ASP .Net
    Replies:
    4
    Views:
    813
  3. Dwayne Madsen

    Q: Div A inside Div B is larger than Div B

    Dwayne Madsen, Jun 1, 2005, in forum: Javascript
    Replies:
    1
    Views:
    242
    David Dorward
    Jun 1, 2005
  4. mscir
    Replies:
    3
    Views:
    361
    Martin Honnen
    Jun 26, 2005
  5. Replies:
    4
    Views:
    185
Loading...

Share This Page