Solved

jQuery height not working for IE?

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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 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…

728 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