Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <title></title>
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
- <style type="text/css">
- #outer {
- width: 1000px;
- height: 320px;
- background: green;
- position: absolute;
- left: 30px;
- top: 100px;
- display: block;
- }
- #outer2 {
- background-color: #FFFFFF;
- margin: 0 1px 1px;
- overflow: hidden;
- width: auto;
- }
- #inner {
- height: 300px;
- margin: 10px;
- background: red;
- }
- </style>
- </head>
- <body>
- <div id="outer">
- <div id="outer2">
- <div id="inner">
- </div>
- </div>
- </div>
- <script type="text/javascript">
- $('#outer2').css('display', 'none');
- console.log("outer+" + $('#inner').outerHeight(true));
- console.log("outer-" + $('#inner').outerHeight());
- console.log("inner-" + $('#inner').innerHeight());
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement