May 28, 2006

What Is Wrong With This Simple CSS Code?

Brain goes “duh”. Doesn’t it figure that I realize what I done after fussing over it forever and then posting this? I had no line breaks, so of course it was using the entire width and thus taking up its own paragraph.

Palm, meet forehead. :D

~Steph

I am in the process of writing a somewhat lengthy philosophy post for this blog. Within the article I am attempting to float a box of text to the right of a paragraph. As far as I can tell, there should be no reason why this is not working.

<div style=”float: right; border:2px dotted black; padding-left:3px”>Note: text text text text text text text txt txt txt txt txt txt txt txt txt text text text text text text text text text text text text text text text text txt xtxtxtxtxtxtt text.</div> Regular paragraph goes here.

Unfortunately, it won’t float to the right! It’s placed into its own paragraph regardless of what I do. I have tried to use a <table>. I’ve left out the boarder and went with simple “float: right”. What a headache, I simply can’t get it to work correctly. Argh!

What am I doing wrong, please?

~Steph


Topics: Waste Basket |

One Response to “What Is Wrong With This Simple CSS Code?”

  1. Mysk Says:
    May 28th, 2006 at May 28, 06 | 11:36 am

    I forgot to mention that I’ve also added “position: relative” to the div tag.