Jonathan wrote:
> This is my first post and I hope this is the appropriate way to take  
> advantage of your advice.
> 
> In the past I have used the "font class" with my CSS for text and
> in my "example 1" the text "box" ends at the end of the actual text.
> 
> I have found that it is now better to to use the "p" tag" and
> in my "example 2" the text "box" runs the full width of the table  
> cell when using the p tag as opposed to the font tag...not good.
> It does the same thing with the "div" tag.
> 
> I then found that if I used the  "float" property the text box would  
> end as I had hoped as shown
> in my "example 3".
> 
> My question is that I am not at all sure that this is appropriate way  
> to use the float tag..??
> I also found information that stated that it was always a good idea   
> to use the "width" property when using the "float" property and I am  
> not sure I used that correctly.
> There may well be a better way to make sure that the text box ends at  
> the end of the text and if so please advise.
> 
> I have included my code example in this email and have also posted  
> that at:
> http://overheadgaragedoorstore.com/text-box-example.html

Hi Jonathan.  Welcome to the list.  Float is appropriate if you need to 
keep it a "block" element.  However, with your example a "span" tag 
might work better for you since it's an inline element by default and 
will "shrink wrap" the way you want.

With block elements you can set height, width, and margin as well as 
padding.  However, if you float it you can only align to the left or 
right. With inline elements you can only use padding but you can center 
the element within it's container.

Be sure to include a doctype so you don't trigger IE's quirks mode.  In 
my opinion CSS is much easier to get a handle on if IE is having as best 
it can :-)

AC
-- 
Audra Coldiron

Rock-n-Roll Design & Hosting
http://rock-n-roll-design.com

KarmaCMS ( http://karmawizard.com ) - the ultimate CSS styled CMS. 
Pre-made designs, designer tools, and reseller program available!
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to