DHTML Forum  

Go Back   DHTML Forum > dhtmlcentral.com > Crossbrowser DHTML
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06.03.2005, 16:40
etern_79 etern_79 is offline
Neuer Benutzer
 
Join Date: 06.03.2005
Location: Germany
Posts: 1
Default

Hello,


I have three div elements and they are stacked as shown below in the source code.





<div id="header">

This is Header

</div>
<div id="data">

This is data and wanted to more 1

This is data and wanted to more 2

This is data and wanted to more 3

This is data and wanted to more 4

This is data and wanted to more 5

This is data and wanted to more 6


</div>
<div id="footer">
this is footer
</div>


I have header, data, footer. The height and width of the header and footer is same e.g height is 20px and width is 100px. The width of data is also 100px, but the height of div is dynamic because the data is variant inside it and I want to make div(data) scrollable when it becomes 250px or more else should be normal and also want to place the three divs in the order like header, data, footer.


I will be thankful to advance who can help me out in this matter.










Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 09.03.2005, 12:19
Paragon Paragon is offline
Erfahrener Benutzer
 
Join Date: 20.09.2001
Location: Netherlands
Posts: 107
Default

el = ducoment.getElementById('data');
if(el.offsetHeight >= 250) {
el.style.height = 250+"px";
el.style.overflow = "auto";
}

you can use this code you can allready set the overflow property in the style sheet and leave it out of the js
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 21.03.2005, 05:25
Garrett Smith Garrett Smith is offline
Erfahrener Benutzer
 
Join Date: 25.05.2001
Location:
Posts: 808
Default

Hi. Did you try this?

#data {
max-height: 250px;
overflow: auto;

/* rule for win ie \*/
-height: 250px;
/* end hide mac ie */
}

ie6 will probably need that last hack. If it works without, take it out. Mac IE might need it, too.


http://dhtmlkitchen.com/ - The best DHTML website!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT +2. The time now is 03:41.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.