Mandarin Logo
MainBlogFAQsBox TipsText TricksColor ChartFree GalleryCSS Opacity
TWO CENTS CURRENT ISSUE 2006 WEST SACRAMENTO CALIFORNIA
FAQsHTML and CSS Frequently Asked Questions
"For People Who Make Mistakes" ...

Float Left with Less Code
One Line of Code
Add a Margin

In the comments of the last post Doc Shazam suggested that we could the do the same thing with only one span by adding the margin. JR mentioned that it could be done with just one span, but without the margin added it broke in Mozilla. That might be what he was trying to say "add a margin". So here we added a margin to the first (and only) span. Both methods work but this one uses only one span.


Copy and paste this in your Blog or Web page.

It will look like this.

YOUR TEXT GOES HERE

That is only one line of code. It's one long line of code but it is only one line. This method works in IE and Mozilla so you can save a few keystrokes by using this version of the matted border code. We put a margin of 15 around all sides for simplicity. You could specify margin-right and margin-left if you really want to tweak it.

Float Left with Less Code
#  Last Updated:  Monday, June 28, 2004
You are viewing one post
VIEW ALL    BACK TO TOP
MAIN BLOG FAQs CSS:Boxes TRICKS About CSS Style Color Chart GALLERY PureText
Validate HTML Validate Style Sheet Elements of Style Yahoo Buzz Google Zeitgeist Lycos 50 TP TP2 TF Technorati Sitemeter
Mandarin Archives 2005: J F M A M J J A S O N D   2004: J F M A M J J A S O N D   2003: J F M A M J J A S O N D   2002: F M A M J J A S O N D
Clean PC Banners Free Banners Tag Board Gator ColdFusion Fade Images Refer Grouping Web Help Drop Caps
This work is licensed under a Creative Commons License