Blog Archives

Order Non-hierarchical Custom Post Types

Non-hierarchical post types are like regular posts which normally do not have a menu_order attribute.  Hierarchical post type are like pages which allows a parent/child and is normally ordered by the menu_order attribute.  What if you have a custom post type that

Posted in Coding Tagged with: ,

iPad textarea not selectable

Problem The textarea on iPad could not be selected and could not have anything entered. Solution The textarea in iPad only responds to the ‘touchstart’ event and not the ‘click’ event, but regular input accepts the ‘click’ apparently.  I some javascript where it would catch

Posted in Coding Tagged with: , ,

What keyboard does an HTML input bring up?

I was having trouble figuring out what input type brings up what keyboard on the iPhone and iPad.  Turns out the number type doesn’t bring up the numeric pad.  Only “tel” does. This is a great article on what input

Posted in Coding Tagged with: , , , ,

Line in Firefox background

Problem When scaling the FireFox and having a background image size set to 100%, the bottom of the image sometimes shows a line on the bottom showing the background behind it. Solution Firefox seems to have a problem with background-size: 100%.  instead

Posted in Coding Tagged with: ,

2 color horizontally expanding background

All done in css, no images.  Float the background past the normal page width based on percentage.  one on the left, one on the right.   http://stackoverflow.com/questions/8893312/css-bi-color-flexible-horizontal-background-band

Posted in Coding Tagged with:

Disabled Trackbacks, but still getting them

Problem I disabled trackbacks in the general WordPress settings, used the Simple Trackback Disabler plugin (because i’m too lazy to do it in mysql) and I still got trackbacks.   Solution The Simple Trackback Disabler apparently doesn’t disable trackbacks for attachments as

Posted in Coding

CSS iOS div lines disappear on zoom in

Problem In iOS devices sometimes safari can display an annoying line above and below div elements.  Like so:   Solution The solution is quite hacky and hopefully this is a bug in Safari and it gets fixed soon.  The solution is

Posted in Coding Tagged with: , ,

Pseudo Selector First Child of Class

Problem How do you apply a style to only the first element with a certain class? :first-child does not do this, that just selects the very first child no matter what the class is. :first-of-type doesn’t even do this.  but

Posted in Coding Tagged with:

Vertically Center Anything With Dimensions

One way to easily vertically center a div is to set it to be absolute, set the width, height and then the top, bottom, left and right all equal to 0.  Something like this: From: http://stackoverflow.com/questions/356809/best-way-to-center-a-div-on-a-page-vertically-and-horizontally

Posted in Coding Tagged with:

Easy Way to Add a Class to a Menu Item in WordPress

Go to Appearance -> Menus.  Open up Screen Options in the top right.  Click on the CSS Classes checkbox under Show Advanced menu properties.  Now each menu item has a textbox where you can enter css classes.

Posted in Coding Tagged with: