8. Changing your style - need help


#1

https://www.codecademy.com/en/courses/web-beginner-en-v6phg/1/3?curriculum_id=50a3fad8c7a770b5fd0007a1#

$(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.


#2

.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')


#3

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


#4

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