Since writing How to style a Submit button in CSS a few months ago, I have found an alternative way to achieve the same result. In this example, we will be using <button> tag instead of <input> tag. The <button> tag will still submit the form that it belongs to [...]
The main purpose of this code is to have “Read more” for a long block of text (eg: comments) without having to separate the text into two div blocks and then use toggle to show/hide the 2nd block. This code simply uses CSS overflow:hidden property to hide long block of text. jQuery live [...]
This example code shows you how you can have a top branding bar similiar to diggbar in just a few lines of html and css.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>framebar example by Web Development Blog</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type="text/css">
body {
margin: 0;
padding: 40px 0 [...]
HTML
<input type="submit" id="submit" value="Search" />
CSS
#submit {
cursor: pointer;
}
In header.php file of my WordPress theme, I have the following code to display a different header image for different pages.
<?php
if (is_page(‘about’)) {
$image = ‘image_about.jpg’;
} else if (is_page(‘projects’)) {
$image = ‘image_projects.jpg’;
} else if (is_page(’services’)) {
[...]