Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Control text wrapping around boxes

Reply
Thread Tools

Control text wrapping around boxes

 
 
Marc
Guest
Posts: n/a
 
      01-18-2005
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.


 
Reply With Quote
 
 
 
 
Bernhard Sturm
Guest
Posts: n/a
 
      01-18-2005
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 =---
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrapping Text Around An Image? Ex-COC HTML 5 12-29-2007 02:15 PM
Wrapping text around a table JA HTML 2 06-12-2006 10:43 PM
MS work around on text wrapping in a datagrid does not work TB ASP .Net 2 02-22-2006 10:34 PM
Text wrapping around image my-wings HTML 3 06-05-2004 05:09 PM
Wrapping text around Image map problem Paul Kissock HTML 1 02-05-2004 09:50 PM



Advertisments