Showing posts with label html. Show all posts
Showing posts with label html. Show all posts

Monday, March 28, 2011

Custom Wordpress Themes: Fix the Comment Box Width

When coding several custom Wordpress themes, the default width of the comments box in comments.php was breaking my table layout. To fix this, I simply changed the width of the textarea tag.

Here is the original code from comments.php (Wordpress 2.7)


<textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4">



Here are two options to fix the width issue.

Change the "cols" value:


<textarea name="comment" id="comment" cols="40" rows="10" tabindex="4"></textarea>



Or, remove the "cols" value and add a specific width:


<textarea name="comment" id="comment" style="width: 400px;" rows="10" tabindex="4">

Wednesday, February 16, 2011

Removing specific HTML tags with Regular Expressions

matches start tag of specific tag including attributes

<\s*span.*?>



The above expression can be very helpful to strip out unwanted <span> tags.

via: Regular Expressions to strip HTML tags - www.pagecolumn.com

Sunday, July 12, 2009

Added the drop-down menu for updated posts

A few days ago I started looking at some HTML/JS snippets to try and get a drop down menu for updated posts, to conserve space.

I found a drop down menu tutorial with code but for some reason it wasn't working, so I used the source code from this blog, which used the same thing, but was working.