posts tagged as html tables

wrapping text around an image in y! groups

Friday, 27 June 2008 6:38 pm by noel
posted in places, tech | tags: , , ,

i have been using yahoo! groups to send out newsletters. in the pursuit of making these newsletters look a little more attractive i wanted to have some small images with the text wrapping around them. easier said than done. yahoo! groups only allows a small, specific subset of css and html to be used in posts. if your html and css tags are not in that specific subset then your code either gets stripped out or replaced by their “safe” tags. that made things a lot more complicated.

adding css style tags to an image tag doesn’t cut it. its not allowed. i checked the docs. wrapping the image tag in spans or divs doesn’t work either. the end result would be that the text will be placed below the image instead of wrapping around it.

the solution i found is to go retro and table the image — wrap the image tag in a single cell table, i.e.:

<table cellpadding="0" cellspacing="0" border="0" align="left" hspace="10" vspace="10">
<tr><td valign="top">
<img src="url/imagename.ext" width="150" height="150" border="0" alt="" />
</td></tr>
</table>

of course, you replace the url/imagename.ext with the address and name of the image you are using and, depending on your alignment inclination, replace the align=”left” to align=”right” in the table tag if you want the image to either be on the left or right side of the page.


one other quirk with regards posting/sending out newsletters in a yahoo group that you have to watch out for is the margin to the right. because of an advert, the width of the upper part of the newsletter is limited to about 500 pixels, give or take a few (arrows 1 and 2) . you’d have to set the width of your text table to about 490. if you go over that, there a large possibility that the advert will overlap and cover your content (arrows 3 and 4).

links:
list of allowed css and html code in a y! groups post

tables, tinymce and wordpress

Wednesday, 23 January 2008 9:22 am by noel
posted in wordpress | tags: , , , ,

tinymce, the visual editor that came with wordpress 2.3.2 has a little trouble with html tables. i made a couple of tables in my html editor, copy and pasted the code into the wordpress page editor, in code mode of course. when i saved the page only the first row of the tables came out in the final page. apparently, the visual editor was stripping some table tags before the page is saved — part of its function i suppose.

a search in the wp forums gave a few solutions, mostly relating to installing a plugin. what worked for me was to turn off the visual editor while i pasted and saved the page. quick and dirty solution i think.

turn off the visual editor

in the wp dashboard, click on usersyour profile and uncheck the “use the visual editor when writing” checkbox (above) and then click on update profile.