Mar
6th

COLSPAN and ROWSPAN Tutorial

Files under HTML & CSS | Leave a Comment

Every webmaster also know that table cells can be spanned more than one column or row. The attribute of ROWSPAN is used to make cell span multiple rows. If let say ROWSPAN=”3″ it will only span a column vertically across three rows.

<table border=”1″ cellspacing=”2″ cellpadding=”2″ width=”200px”>
<tbody>
<tr>

<td>Codebasic.net</td>
<td rowspan=”2″>spanned</td>
<td>myLengLui.com</td>
</tr>
<tr>
<td>
imDavidLee.com</td>
<td>LifeTechie.com</td>
</tr>
<tr>

<td>LimPek.com</td>
<td>innoDesigner.com</td>
<td>PenangBlogger.com</td>
</tr>
</tbody></table>
Codebasic.net spanned myLengLui.com
imDavidLee.com LifeTechie.com
LimPek.com innoDesigner.com PenangBlogger.com

The COLSPAN attribute is to make a cell span multiple columns. It spans the columns and will make your table cell span horizontally.

(more…)

Jan
30th

Change Mouse Pointer Using CSS

Files under HTML & CSS | Leave a Comment

There are certain scenarios where you want to change the mouse cursor when you hover over a link. By the way, when you do such a thing you put some javascript in the onclick event and with that you want to give the user a feeling that he/she’s clicking on a hyperlink.

Do you know how to change mouse pointer using CSS? Well, it’s simple and easy. This is the basic cursor type that we normally used:

i) default – Display the normal mouse pointer icon

ii) wait – The mouse icon to represent “processing”

iii) crosshair – A plus symbol

iv) text – An “I” shaped icon that is displayed when selecting text

v) pointer - A hand icon that you see when you hover

vi) help – A question mark

x) move – A cross mark

(more…)

Oct
17th

Simple Drop Down Menu Tutorial

dropdownmenu

This week, you will learn how to create a simple drop down menu, which is a 1 level drop-down menu with timeout effect. In the other words, it is similar to treelike unordered list.

I just wrote the simple script for the menu that will be displayed on the page:

HTML Code

<ul id=”menuStyle”>
<li><a href=“#” onmouseover=”menuopen(’m1′)onmouseout=”closetime()”>Page 1</a>

<div id=“m1onmouseover=“cancelclosetime()” onmouseout=“closetime()”>
<a href=”#”>Subpage 1A</a>
<a href=“#”>Subpage 1B</a>
<a href=“#”>Subpage 1C</a>
<a href=“#”>Subpage 1D</a>
<a href=“#”>Subpage 1E</a>
</div>

</li>

<li><a href=“#” onmouseover=“menuopen(’m2′)” onmouseout=“closetime()”>Page 2</a>

<div id=“m2″ onmouseover=“cancelclosetime()” onmouseout=”closetime()“>
<a href=“#”>Subpage 2A</a>
<a href=”#”>Subpage 2B</a>
<a href=“#”>Subpage 2C</a>
<a href=“#”>Subpage 2D</a>
</div>

</li>

<li><a href=”#” onmouseover=“menuopen(’m3′)” onmouseout=“closetime()”>Page 3</a>

<div id=”m3″ onmouseover=“cancelclosetime()” onmouseout=“closetime()”>
<a href=“#”>Subpage 3A</a>
<a href=“#”>Subpage 3B</a>
</div>

</li>

<li><a href=“#” onmouseover=“menuopen(’m4′)” onmouseout=“closetime()”>Page 4</a>

<div id=“m4″ onmouseover=“cancelclosetime()” onmouseout=“closetime()”>
<a href=“#”>Subpage 4A</a>
<a href=“#”>Subpage 4B</a>
</div>

</li>

<li><a href=“#” onmouseover=“menuopen(’m5′)” onmouseout=”closetime()”>Page 5</a>

<div id=“m5″ onmouseover=“cancelclosetime()” onmouseout=“closetime()”>
<a href=“#”>Subpage 5A</a>
<a href=“#”>Subpage 5B</a>
<a href=“#”>Subpage 5C</a>
</div>

</li>

</ul>

As you can see, I’ve used unordered list for menu items. The event handlers that I used to control the show and hidden layer are onmouseover and onmouseout.

CSS Code

Refer to http://codebasic.net/dropdownmenu.css

See more…

(more…)

Sep
5th

PHP Tutorial: How To Upload Files Using PHP & HTML Form

Create an Upload File Form

This is a tutorial regarding uploading file using PHP. You need to build a HTML form that lets users to select a file to upload. See my sample code for a more details at forms.

phpuploadfile4

There are a couple of important things to note:
- An upload form is another type of input form, simply set the input type attribute to file.
- Set the attribute of form called enctype to “multipart/form-data”. This means that the form require the contents of a file, to be uploaded.

(more…)

Aug
15th

CSS Rotate Text 90 Degrees

Files under HTML & CSS | 1 Comment

Here is a quick example on how to use CSS to rotate text without Javascript. But you still need to specify 2 different properties for 2 different kinds of browser.

Text Rotation With CSS

For Webkit and Firefox (as of 3.5), you can take advantage of the transform property to handle the text rotation. Each browser has its property.

-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);

When it comes to effects in Internet Explorer, you need to use BasicImage filter. It offers the ability to rotate any element that has layout.

filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);

The rotation property of the BasicImage filter can accept one of four values: 0, 1, 2, or 3 which will rotate the element 0, 90, 180 or 270 degrees respectively.

Besides, the BasicImage filter has other properties that can be set like mirroring, masking and others.

(more…)