View Single Post
  #7 (permalink)  
Old 09-07-06, 09:13 AM
Spaced Spaced is offline
Newbie Coder
 
Join Date: Jul 2006
Location: Winnipeg MB
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
I forgot one part of this.
With the float on <p> tag the border will go only the length of the text. The "clearyourclass" class is to push any text that is suppose to be underneath "yourclassname" you can do this with a <br clear="all" /> but you have less control of the final product.
Code:
CSS:
.clearyourclass{width: 100%; float: left;}
.yourclassname{margin: 2px; padding: 5px; border: 1px solid #000; float: left; clear: both;}

-----------
<div class="clearyourclass">
     <p class="yourclassname">Your text Here</p>
</div>
Reply With Quote