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.
