8. Changing your style - need help



(document).ready(function(){ (“div”).height(“200px”);
("div").width("200px"); (“div”).border-radius(“10px”);


Plz tell me what is wrong with border-radius, error says radius is not defined, by whom, me or website. pic attached.


.border-radius is not a built-in jquery function like height and width. The reason for this is, the manipulation of height and width is already built into javascript core.

To fix this, jQuery includes a special .css method, which allows you to add any custom css rules you want. You can see this mentioned in the instructions

the code you’ll need to use is something like $('div').css('border-radius','10px')


thanks, i just found out same this on website…
$(“div”).css(“border-radius”, “10px”);


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.