• Categories

  • Backlog

WordPress: Ban on CSS

About a week or so ago, the guys at wordpress had disabled the ability to use inline CSS. The reasons are spread across wordpres. I for one don’t see the need to block all CSS. I used to use inlines for subtle things such as giving my pictures an one pixle border then lifting that border off the image, and finally pushing that image off of the text. Real harmful stuff, eh?

So, after a few days of thinking I came up with several options. Lo and behold one worked.

My first thought was to switch it from inline, to embedded. You probably are wondering the difference…Inline is when you grab a <p> and add a style attribute to it, then the CSS goes in the style. Embedded is when you define classes an apply them. Yes, style is a valid tag and is still applied in X/HTML 4.01 Strict. But the WordPress bot or whatever strips the CSS out. I find this odd because it strips the CSS out but leaves the empty <style> tags.

Once again I began thinking. I had a thought of reverting to old school style of programing. Yep that’s right, use plain old HTML tags. That image above…I can do almost the same thing with normal X/HTML than I did with CSS. Our <img> tag has a nifty attribute called align. It does the same as

float:right,left;

So here’s my positioning, it has another attribute border. Of course you don’t have sure prescise measurements but it gets it done.

Another thing that you cannot do is change the spacing. Or else I can’t think of any way to without CSS.

Technorati Tags: , ,

Advertisements

2 Responses

  1. The ban stinks, yes.

    For spacing, you can apply “hspace” and “vspace” to an img. It’s not valid, but what can we do?

    If you do hspace=”10″, there will be a 10 pixel gap on left and right side.

  2. Yes I don’t think it is valid because h and vspace were cycled out when HTML 4.0 or 4.01 came due to the fact that you can have better control via CSS.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: