views:

104

answers:

2

I have created a div programaticaly using.

var Element;
Element = document.createElement('div');

Now I want to change the right and bottom border to "#CCCCCC 1px solid".

I don't want to use a library for this and using CSS classes is not possible.

+1  A: 

Element.setAttribute("style", "bottom-right: #CCCCCC 1px solid"); ?

Dmitry
+3  A: 
element.style.borderRight = element.style.borderBottom = "#CCCCCC 1px solid";
jtbandes