8/14 Changing Your Style?


#1

$(document).ready(function() {
$('div').css( {
$("div").height("200px");
$("div").width("200px");
$("div").border-radius("10px");
});
});

Oops, try again. Did you give your div a height of 200px?


#2

@cssmaster90864,
jQuery has methods width() and height()
with which you cant get & set Attribute-Values....

For all the other CSS-Attribute's you will have to use the css() Method

http://api.jquery.com/css/
http://api.jquery.com/width/
http://api.jquery.com/height/


#4

10 posts were split to a new topic: 8/14 Changing Your Style


#7

Hi cssmaster90864,

You need to use the css method.

Try this:

$(document).ready(function(){
$("div").height("200px");
$("div").width("200");
$("div").css("border-radius", 10);
});`

Height and width do not need the css method. You can edit them directly, however, back-ground or radius border they need the css method in order to edit them.