Images and text next to each other and either one making the background bigger?

Discussion in 'HTML & Website Design' started by Grand, Apr 24, 2007.

  1. #1
    Ok, that's probably the most confusing and badly written thread title ever. I'll just show you what I mean.

    [​IMG]

    I hope this makes sense. Thanks.
     
    Grand, Apr 24, 2007 IP
  2. cascadingstylez

    cascadingstylez Guest

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    that makes no sense. Rounded corners are messy in CSS 2.0, personally i wont attempt it until CSS 3.0 is released, which supports multiple backgrounds.

    If you want the <div> your text is in to expand when the text gets longer you will need to clear your floats. faq.css-standards.org or wshtml.com
     
    cascadingstylez, Apr 25, 2007 IP
  3. Grand

    Grand Peon

    Messages:
    165
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    By the way, I was a bit misleading, I've already got rounded corners, I'm not asking how to do that. The question was just how to code it so that the box expands with either the image OR the text.

    Clearing the floats eh..I'll experiment with that, thanks.

    EDIT: Woah, I learnt the awesomest piece of CSS, min-height: #px. It's all fixed now, thanks anyway.
     
    Grand, Apr 25, 2007 IP
  4. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #4
    I wouldn't rush using "min-height" yet with our great set of compatible browsers so far. Clearing floats is the way to go at the moment, something like
    <div>
     <div id="your_image" style="float:left">Image</div>
     <div id="your_text" style="float:right">text</div>
     <br clear="all" />
    </div>
    Code (markup):
     
    Clive, Apr 25, 2007 IP