While doing my last post I couldn’t get an image aligned the way I wanted it using the default WordPress tools( Insert Image -> align right). I generally prefer to write in HTML because it gives me full control. WordPress uses a modified version of TinyMCE which has a javascript cleaning script which will try to ‘correct’ your markup. Markup is basically a fancy way to describe HTML for web design. Generally speaking markup cleaning is great, but for veteran HTMLers it can be frustrating.

After a quick Google I found this: http://wordpress.org/extend/plugins/raw-html/ (there really is a plugin for everything!)

The WordPress Plugin ‘Raw HTML’ gives you the ability to insert tags that will stop TinyMCE from hijacking your code. It basically will leave all  HTML, CSS and Javascript within these tags alone. There are the tags it uses on the HTML view:

<!--start_raw-->
HTML / CSS / Javascript
<!--end_raw-->

Unfortunately the problem I had with image alignment was not fixed, because by default WordPress will wrap all line breaks in paragraph tags (<p></p>). Oh well, I’m sure this will come in handy in the future anyway! Back to being a humble Brisbane Website Designer.


We'd love to
hear from you

We've prepared a simple project planner to get started.

Lets get started

Or send us a
message

Phone: (07) 3878 1151

Address: Office 2, 59 Hardgrave Rd,
West End, Brisbane, 4101, QLD, Australia

  • This field is for validation purposes and should be left unchanged.
css.php