Solved

jQuery height not working for IE?

Posted on 2010-11-12
4
732 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
  • 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Before we dive into the marketing strategies involved with creating an effective homepage, it’s crucial that EE members know what a homepage is. In essence, a homepage is the introductory, or default page, of a website that typically highlights the …
This article discusses how to create an extensible mechanism for linked drop downs.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
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)

705 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now