Perhaps the most unusual question title today!
I'm trying to achieve something on my site which I'm having an incredible amount of difficulty, and hoping someone can either show me the error of my ways or advise if I'm handling this totally the wrong way.
Consider the following:
1-----------------------------------------------------------------------+
|2--------+ 3---------------------+ 4-------------+ |
|| | | | | | |
|| a-+ | | b-+ c-+ d-+ e-+ f-+ | | g-+ h-+ i-+ | |
|| | | | | | | | | | | | | | | | | | | | | | | | |
|| +-+ | | +-+ +-+ +-+ +-+ +-+ | | +-+ +-+ +-+ | |
|| | | | | | |
|+--------+ +---------------------+ +-------------+ |
+-----------------------------------------------------------------------+
|<--------------- SCREEN WIDTH --------------->|
Here's what I'm trying to achieve based on the numbers and letters relating to the layout I want:
1= One 'container' which is of fixed height and NO WIDER than the screen width (give or take margins etc so it fits in the centre of the screen).
This 'container' also needs a scroll bar, horizontal ONLY, so that the user can scroll it's contents.
Within this container are 3 other containers, labelled 2, 3 and 4. These will vary in size, but NEVER contain scrollbars, but each container, as it grows, needs to remain in container 1 and NEVER scroll vertically.
Within 2, 3 and 4, additional containers (widgets) can be inserted thus making it's parent container grow.
As you can see in my layout, container 2 has 'widget' a, container 3 has widgets b, c, d, e and f and container 4 has widgets g, h and i.
The jQuery/Javascript to add everything I've managed no problems, but the actual CSS and 'layout' I'm having problems with.
I've made container 1 have 'white-space:nowrap;'
so this obliterates the vertical scrolling, and using jQuery similar to $('#containerA').append([something]);
also adds the 'widgets' to the respective containers (2, 3 or 4).
At present, my HTML is as follows:
<div id="divfieldWidgets" style="width:auto;margin-top:40px;background-color:#FFFFFF;border:1px solid gray;height:320px;left:50px;right:50px;-moz-box-shadow: 4px 4px 2px #888;-webkit-box-shadow: 4px 4px 2px #888;box-shadow: 4px 4px 2px #888;overflow:hidden;margin-left:60px;margin-right:60px;overflow:scroll;">
<div style="white-space:nowrap;float:left;">
<div id="divFieldWidgetsProductAndMarketing" style="background-color:#FFEEEE;height:100%;width:auto;white-space:nowrap"></div>
<div id="divFieldWidgetsYears" style="background-color:#EEFFEE;height:100%;width:auto;white-space:nowrap"></div>
<div id="divFieldWidgetsCalculations" style="background-color:#EEEEFF;height:100%;"></div>
</div>
</div>
Which achieves what I want in some parts (i.e. the horizontal scrolling only of the MAIN container and the sizing of containers 2, 3 and 4 when 'widgets' are adding), but as you can see, not all together.
Would REALLY appreciate some help with this.
TIA