To add stylesheets for specfic Internet Explorer versions you can add the blocks of code below to the head section of your HTML code. Make sure the code is placed beneath your main css declarations. All IE Versions <!–[if IE]> <link rel=”stylesheet” type=”text/css” href=”ie-all.css” /> <![endif]–> IE6 <!–[if IE 6]> <link rel=”stylesheet” type=”text/css” href=”ie6.css” /> […]
Tag: html
Stop iPad and iOS devices formatting numbers on webpage
An iOS will automatically see some numbers as telephone numbers and will format the number bypassing any css styling your website might have. You can stop this by altering the Apple specific meta tags. Place the code below in the head section of your webpage. <meta name=”format-detection” content=”telephone=no”>
Remove iOS styling on input boxes
By default html input boxes will have a inner shadow style applied on iPad and other iOS devices. You can remove this styling by adding the following css code to a html input object. -webkit-appearance:none;
Using clearfix css method when floating child elements in a div
Assigning this css class to a html container will clear any floats within it. .clearfix:after, #container:after { clear:both; content:”\0020″; display:block; height:0; max-height:0; overflow:hidden; visibility:hidden; }
HTML Code to Text Converter
Useful for converting code for presentation on a WordPress post. Converts tags so they are not processed. Good for displaying blocks of code for tutorials etc.. This version seems the best I have found for WordPress. WEBSITE
How to list a specific number of posts from 1 category in WordPress
You can place the following code in one of your theme’s template files to list a particular amount of posts from one of your site’s catagories. <h2>Last 5 Tutorials</h2> <?php query_posts(‘category_name=tutorials&showposts=5’); ?> <?php while (have_posts()) : the_post(); ?> <h2><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></h2> <?php the_excerpt(); ?> <?php endwhile; ?> Tested with WordPress 3.3
Wrapping pre tag text in a div using css
When using pre tags in html to display code blocks it will ignore the div boundaries and not wrap the text by default. By adding some css for pre tags this can be accomplished as follows. Hint: Another option is to use overflow:auto which will add scroll bars for the content. pre, code{ /*Wrap pre […]