Solved

jQuery height not working for IE?

Posted on 2010-11-12
4
741 Views
Last Modified: 2012-05-10
This works perfectly in Firefox. The box appears in the bottom right corner of the parent Div with a starting height of 200.Why doesn't it work in IE? Any fix for this?


<html>
<head>

<link type="text/css" href="jquery-ui-1.8.6.custom.css" rel="stylesheet" />      
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jquery-ui-1.8.6.custom.min.js"></script>


<script>
$(function() {
    $("#dialog").dialog( { width: 200, height: 200 }).parent().position({ my: 'right bottom', at: 'right bottom', of: '#parent' });
});
</script>
</head>

<body>


<style>#parent { border: solid 1px #ddd; width: 500px; height: 400px; }</style>

<div id="parent">
</div>

<div id="dialog">
Test Content<br />Test Content<br />Test Content<br />Test Content<br />Test Content<br />Test Content<br />Test Content<br />Test Content<br />Test Content<br />Test Content<br />Test Content<br />Test Content<br />Test Content<br />Test Content<br />
</div>


</body>
</html>
0
Comment
Question by:tonyhhisc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
jmatix earned 500 total points
ID: 34121795
Try either:

<script>
$(function() {
    $("#dialog").dialog( { width: 200, height: 200 }).css("height", "200px").css("overflow", "scroll").parent().position({ my: 'right bottom', at: 'right bottom', of: '#parent' });
});
</script>


OR this if you want overflow with scroll bars:


<script>
$(function() {
    $("#dialog").dialog( { width: 200, height: 200 }).css("height", "200px").css("overflow", "scroll").parent().position({ my: 'right bottom', at: 'right bottom', of: '#parent' });
});
</script>
0
 
LVL 16

Expert Comment

by:jmatix
ID: 34121831
Sorry if want overflow hidden it should be:

<script>
$(function() {
    $("#dialog").dialog( { width: 200, height: 200 }).css("height", "200px").css("overflow", "hidden").parent().position({ my: 'right bottom', at: 'right bottom', of: '#parent' });
});
</script>
0
 

Author Comment

by:tonyhhisc
ID: 34136365
EXCELLENT! Thanks a million!
0
 

Author Closing Comment

by:tonyhhisc
ID: 34136366
You rock!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
In this article you will learn how to create a free basic website on Bitbucket, a git service provider. Polymer creates dynamic HTML components, which allow more flexibility than static HTML. This tutorial uses Ubuntu Linux but can also be done on W…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question