here i am going to ask two questions...

how to get the exact width of the div

Code:

```
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    alert("Width of div: " + $("#a").width());
  });
});
</script>
</head>
<body>
<div id="a" style="width:1000px;height:500px;">
<div style="height:100px;width:300px;padding:10px;margin:3px;border:1px solid blue;background-color:lightblue;">
</div>
</div>
<br>
<button>Display the width of div</button>

</body>
</html>

```

here i am declared 2 .. parent div width is 1000 child div width is 300 if i use $("#a").width() function i will get 1000 which i mentioned on that div. but how can i get the exact used width(300) using $("#a") as well as same in height?