Control text wrapping around boxes

Discussion in 'HTML' started by Marc, Jan 18, 2005.

  1. Marc

    Marc Guest

    I have seen many CMS packages wrap text around a box such as the one
    at http://www.armchairdictator.com/index.php?art/id:5

    but the text is always far too close to the box on the page. How does
    one create padding around boxes like this one? I think that with
    images you can add a padding parameter (or maybe not) to space text a
    distance away from crowding the graphic. Thank you.
     
    Marc, Jan 18, 2005
    #1
    1. Advertising

  2. Marc wrote:
    > I have seen many CMS packages wrap text around a box such as the one
    > at http://www.armchairdictator.com/index.php?art/id:5
    >
    > but the text is always far too close to the box on the page. How does
    > one create padding around boxes like this one? I think that with
    > images you can add a padding parameter (or maybe not) to space text a
    > distance away from crowding the graphic. Thank you.


    you could add padding to your float box (as in the above case):

    <div id="authorbox">
    <img src="out/avatar/1_authoricon.png" alt="author" />
    Text
    </div>

    div#authorbox {
    float:left;
    margin: 3px; /* 3px margin of the box to each side */
    padding: 3px; /* 3px padding within the box to each side */
    }
    div#authorbox img {
    margin:2px; /* margin of the image to the text on each side */
    }

    please refer to the box model specs fron the W3C:
    http://www.w3.org/TR/REC-CSS2/box.html

    HTH
    bernhard

    --
    www.daszeichen.ch
    remove nixspam to reply


    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= East/West-Coast Server Farms - Total Privacy via Encryption =---
     
    Bernhard Sturm, Jan 18, 2005
    #2
    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. TB
    Replies:
    2
    Views:
    3,782
  2. Paul Kissock

    Wrapping text around Image map problem

    Paul Kissock, Feb 5, 2004, in forum: HTML
    Replies:
    1
    Views:
    477
    Mark Parnell
    Feb 5, 2004
  3. my-wings

    Text wrapping around image

    my-wings, Jun 5, 2004, in forum: HTML
    Replies:
    3
    Views:
    662
    my-wings
    Jun 5, 2004
  4. JA
    Replies:
    2
    Views:
    614
    Wÿrm
    Jun 12, 2006
  5. Ex-COC
    Replies:
    5
    Views:
    461
    Travis Newbury
    Dec 29, 2007
Loading...

Share This Page