| Page 1 of 1 | [ 7 posts ] |
|
I've tried dozens of solutions out there in the web and none of them work.
I want to put a YUI datatable on the left side of my page so that it fills the browser's full height, and then, if the datatable content is too big, it will scroll vertically. I should be able to do this by setting the html/body elements to 100% and then populating it with divs of height 100%. I've tried so many solutions, they're all *years* old - and not one of them work. I'm currently running FF9. Anyone? And what if I want to just scroll my datatable? I've got datatable-datasource but there's no datatable-datasource-scroll. Surely I'm not the first YUI developer who wants a datatable that fills the browser height? |
Juan Ignacio DopazoYUI Contributor
|
Does this work for you? http://jsfiddle.net/8LCQB/
I think most of us use JavaScript to avoid the 100% height problem when doing complex app-like layouts. There's a nice module in YUI for throttling the resize event called event-resize that's helpful for that. |
|
Well, it makes the div fill the screen with no scroll, yes. So, the idea then is to place everything on the screen using absolute positioning? Or at least absolute dimensions?
But that doesn't solve the problem of changing browser size. I tried placing a div within the main div and setting its height to 100% (so that it fills the window regardless of size), but I end up with an inner div that overhangs the outer div and triggers the scroll bars. |
Juan Ignacio DopazoYUI Contributor
|
DaveC426913 wrote: Well, it makes the div fill the screen with no scroll, yes. So, the idea then is to place everything on the screen using absolute positioning? Or at least absolute dimensions? No, not at all. The idea is to put everything inside the 100% height div and try not to break it. DaveC426913 wrote: But that doesn't solve the problem of changing browser size. I tried placing a div within the main div and setting its height to 100% (so that it fills the window regardless of size), but I end up with an inner div that overhangs the outer div and triggers the scroll bars. I don't quite follow what your problem is. It sounds as if there's other content that is overflowing the container. Without a jsfiddle or a live example it'll be hard to figure out what's wrong. As far as scrolling datatables go, Luke's working on Y.DataTable.Scrollable for 3.5.0. You can check it out in the preview he uploaded to the Gallery http://yuilibrary.com/gallery/show/data ... 50-preview |
Alberto SantiniYUI Contributor
|
Hello D.
About datatable, datasource and scroll you may read "Plugin.DataTableSort problem Datatable using Datasource.IO" post: viewtopic.php?f=92&t=7180 Hope that helps, IceBox |
|
"I don't quite follow what your problem is. It sounds as if there's other content that is overflowing the container. Without a jsfiddle or a live example it'll be hard to figure out what's wrong."
If I set my wrapper to 100%, it fills the window (say my window is 760px, now my wrapper is 760px). Perfect. I add a header bar of 40px. Below that I want a content area that fills the space vertically. How do I tell the content div to be only 720px in height without hardcoding its height? (The solution needs to work if I resize the browser, I can't hardcode its height). |
Juan Ignacio DopazoYUI Contributor
|
DaveC426913 wrote: I add a header bar of 40px. Below that I want a content area that fills the space vertically. How do I tell the content div to be only 720px in height without hardcoding its height? (The solution needs to work if I resize the browser, I can't hardcode its height). Oh ok! Yeah, there's no way of doing that with CSS in older browsers. Most of the time we try to mimic it with background colors. Modern browsers have more tools for complex layouts like that and in the future they'll possibly support stuff like height: 100% - 40px. So yes, in your place I'd probably avoid the problem and use JavaScript to set the height of that flexible div. You can also try out this Gallery module http://yuilibrary.com/gallery/show/axo-layout |
| Page 1 of 1 | [ 7 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group