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.
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.
Share Improve this question edited May 9, 2010 at 18:40 Jared Updike 7,2868 gold badges48 silver badges73 bronze badges asked Nov 15, 2009 at 1:01 Aaron de WindtAaron de Windt 17.7k14 gold badges50 silver badges67 bronze badges2 Answers
Reset to default 3element.style.borderRight = element.style.borderBottom = "#CCCCCC 1px solid";
Element.setAttribute("style", "bottom-right: #CCCCCC 1px solid"); ?