?
Solved

jQuery height not working for IE?

Posted on 2010-11-12
4
Medium Priority
?
745 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 2000 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn how to dynamically set the form action using jQuery.
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…
Suggested Courses

800 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