How to make a Button With Line Breaks?
You can use carriage return characters to break the line: 
 <input type=”button” value=”Really
Tall
 Button”>
You can use carriage return characters to break the line: 
 <input type=”button” value=”Really
Tall
 Button”>
a { display: block; background: url(sprite.png) no-repeat; height: 30px; width: 250px; } a:hover { background-position: 0 -30px; } The set height and width ensure only a portion of the sprite.png graphic is shown. The...
Sticky footer on Google: Have a <div> with class=”wrapper” contain everything. After the wrapper </div>, place thepush div, then the footer div. * { margin: 0; } html, body { height: 100%; } .wrapper { min-height: 100%; height: auto !important; height:...
from vimeo api: “Note: if your site will contain a Universal Player embed, but won’t show it right away, it’s best to not to include the embed code until the video is ready to...
First step is to move CodeIgniter and the WordPress files in their own directory. After that, put the following line at the top of your CodeIgniter’s index.php file. Change the path to wp-blog-header.php as needed to...
Found a solution if anyone else struggles with this. Only posted the question out of desperation after 4 hours testing/Googling! function get_post_by_title($page_title, $output = OBJECT) { global $wpdb; $post = $wpdb->get_var( $wpdb->prepare( “SELECT ID...
I prefer using one of the native XML extensions since they come bundled with PHP, are usually faster than all the 3rd party libs and give me all the control I need over the markup. DOM...
Given that the canvas element has a transparent content model, it may contain fallback elements which are displayed in the event that the canvas element is unsupported. They will not be displayed if the canvas is supported. If you display a list of controls in...
I tried to load some scripts into a page using innerHTML with a div. It appears that the script loads into the dom, but it is never executed (at least in ff and chrome)....
Automatic copying to clipboard may be dangerous, therefore most browsers (except IE) make it very difficult. Personally, I use the following simple trick: function copyToClipboard (text) { window.prompt (“Copy to clipboard: Ctrl+C, Enter”, text);...
Joomla is a content management system used to set up websites that use databases to store content. A Joomla site can be installed in a subfolder of a site’s server. Later you can move...
Start your CSS files with this PHP (and name it style.php): <?php ob_start (“ob_gzhandler”); header(“Content-type: text/css; charset: UTF-8”); header(“Cache-Control: must-revalidate”); $offset = 60 * 60 ; $ExpStr = “Expires: ” . gmdate(“D, d M...
It is a simple, four step process to move your installation from one server to another. Step 1 Clear the Cache: Login to admin, go to Site Admin/System Maintenance and clear the cache. This...
Modules From time to time you need to tweak the strings that are displayed in a module, or maybe change an admin form or two. Possibly remove some of the optional fields so that...
Step 1 Install CMSms on your production hosting: So you have a internet domain for your site, say website.com. Your old plain HTML pages are available at website.com/aboutus.html, website.com/products.html, website.com/solutions.html etc. And your old...
Link to CSS files You essentially hotlink directly to CSS files on Google.com. Through URL parameters, you specificity which fonts you want, and what variations of those fonts. <head> <link rel=”stylesheet” type=”text/css” href=”http://fonts.googleapis.com/css?family=Tangerine:bold,bolditalic|Inconsolata:italic|Droid+Sans”> </head>...
The use of scriptlets (those <% %> things) in JSP is indeed highly discouraged since the birth of taglibs (like JSTL) and EL (Expression Language, those ${} things) over a decade ago. The major disadvantages of scriptlets are: Reusability: you can’t reuse scriptlets. Replaceability: you can’t make...
HTML Wrapper with div’s as the “slides”, which can contain any content. <div id=”slideshow”> <div> <img src=”http://farm6.static.flickr.com/5224/5658667829_2bb7d42a9c_m.jpg”> </div> <div> <img src=”http://farm6.static.flickr.com/5230/5638093881_a791e4f819_m.jpg”> </div> <div> Pretty cool eh? This slide is proof the content can be...
While not all that common today, malware on phones is increasing, and you should get to know what puts your security at risk. Dealing with a virus or malware has long been accepted as...
Optimize your LinkedIn profile to stand out to potential employers. Job seekers are often advised to make their social networks private, but in the case of LinkedIn, the opposite is true. That professional social...
.animate( properties [, duration ] [, easing ] [, complete ] )Returns: jQuery Description: Perform a custom animation of a set of CSS properties. version added: 1.0.animate( properties [, duration ] [, easing ] [, complete ]...
Relying on the default value of an uninitialized variable is problematic in the case of including one file into another which uses the same variable name. It is also a major security risk with register_globalsturned on. E_NOTICE level error...
You don’t need jQuery for that purpose. You can use the pure JavaScript: function getParameterByName(name) { name = name.replace(/[\[]/, “\\\[“).replace(/[\]]/, “\\\]”); var regexS = “[\\?&]” + name + “=([^&#]*)”; var regex = new RegExp(regexS);...
Use prepared statements and parameterized queries. These are SQL statements that are sent to and parsed by the database server separately from any parameters. This way it is impossible for an attacker to inject malicious...
#content { position: absolute; top: -9999px; left: -9999px; } Removes an item from the page, without affecting page flow or causing scrollbars. Much better than display: none; or even visibility: hidden;
This is one of the fastest and easiest ways of emptying an array. Of course there are may other ways, but those usually include creation of a new array. This way you reuse the...
Comment out the top line there, and add the rest to your wp-config.php file to get more detailed error reporting from your WordPress site. Definitely don’t do this live, do it for local development and testing....
<script> <!– function getStylesheet() { var currentTime = new Date().getHours(); if (0 <= currentTime&¤tTime < 5) { document.write(“<link rel=’stylesheet’ href=’night.css’ type=’text/css’>”); } if (5 <= currentTime&¤tTime < 11) { document.write(“<link rel=’stylesheet’ href=’morning.css’ type=’text/css’>”); }...
For the functions.php file: function year_shortcode() { $year = date(‘Y’); return $year; } add_shortcode(‘year’, ‘year_shortcode’); Usage Use [year] in your posts.