•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 375,172 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,109 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 4463 | Replies: 4
![]() |
•
•
Join Date: Jul 2006
Posts: 11
Reputation:
Rep Power: 3
Solved Threads: 0
Hi guys....
I am having trouble changing the color of the LEFT border in a table.
i'm using the following javascript:
cell1 is the correct id of the table cell.
If i take away the "-left" part in "border-left", it will change the border of the whole cell. Problem is, i need to change only SPECIFIC borders.
Any Suggestions?
Rock On
I am having trouble changing the color of the LEFT border in a table.
i'm using the following javascript:
document.getElementById("cell1").style.border-left="3px red solid";cell1 is the correct id of the table cell.
If i take away the "-left" part in "border-left", it will change the border of the whole cell. Problem is, i need to change only SPECIFIC borders.
Any Suggestions?
Rock On
Try "borderLeft" instead. One of the unfortunate aspects of web development is that the CSS property may or may not have a corresponding JavaScript property, and they don't always map directly to each other. Also, as you can see, the spelling will differ.
So, "style.borderLeft" is the JavaScript property that changes the "border-left" CSS declaration.
Here's a nice cross-reference: http://codepunk.hardwar.org.uk/css2js.htm
So, "style.borderLeft" is the JavaScript property that changes the "border-left" CSS declaration.
Here's a nice cross-reference: http://codepunk.hardwar.org.uk/css2js.htm
Last edited by tgreer : Aug 30th, 2006 at 3:19 pm.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
ajax apple asp cell cell phones congress developer development email firefox gpt guid partition table home html internet iphone ipod javascript kernel keynote lg linux macworld microsoft mobile msdn office partition phone phones playstation prada ps3 site software sql stocks technology termination fees touchscreen vista web 500
- html table cell coloring (JSP)
- Gap between div and table (HTML and CSS)
- onClick Events to Change to dynamic text (HTML and CSS)
- Remove style with JavaScript (JavaScript / DHTML / AJAX)
- Frames of Pictures (C++)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: how to change the the value of src in <embed> using javascript
- Next Thread: Disclaimer Messages



Linear Mode