Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-06-2013, 08:57 PM   PM User | #1
jason_kelly
Regular Coder

 
Join Date: Sep 2011
Posts: 140
Thanks: 88
Thanked 0 Times in 0 Posts
jason_kelly is an unknown quantity at this point
Using Javascript to resize a column width

Hello,

I need the help of an expert on this forum,

how can some javascript coding be written such that when I position my mouse over any of the table header column dividers, that 1.) change the cursor to the w-resize; and 2.) when I click and drag to the specified size that I want and the column would then be resized to the specified width?

Code:
<!DOCTYPE html>

<html>

<head>
	<meta charset="utf-8">

<style type="text/css">
#table-css-border-1 {
		width: 100%;
        border-style: outset; 
        border-width: 1px; 
        border-spacing: 2px; 
} 
                         
#table-css-border-1 td, #table-css-border-1 th { 
        border-style: inset; 
        border-width: 1px; 
}
</style>

</head>

<body>

<table id="table-css-border-1">
	<tr>
		<th>header1</th>
		<th>header2</th>
		<th>header3</th>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	</tr>
</table>

</body>

</html>
jason_kelly is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:52 PM.


Advertisement
Log in to turn off these ads.