I've got a two-column layout, and in one row the left column contains a resizeable textarea. When the textarea is stretched to the right, it overflows into the right column. I would like the right column to flow under the left column in such a case (like what happens when the browser window is narrowed). Any ideas how to style this correctly?
Related
I have two columns of dynamic content, and want to align them as follows:
a) if the right column is small, I want it to be vertically centered
b) if the right column is large, I want it to be top aligned
c) the right column should always have (at least) 80px top padding.
See first and second image below for desired behavior.
Without c), this is trivial, eg one method is using flex with the second column having align-self:flex-start .
With c) it still appears trivial - just give the right column 80px top AND bottom padding to ensure it is centered, but extends down if it doesn't fit.
However, I do not want the extra 80px at the bottom when the content is large, as shown in the third image below, which makes things far more complex. I've tried a solution like having the right column its own flex container with flex-direction:column, using two 80px height divs with one set to flex-shrink:1 and the main content set to flex-shrink:0, in the hope that one 80px would collapse when unnecessary - but this simply doesn't work (the right column isn't restricted in height so never shrinks).
Any options? The use-case here is that the right column is dynamic text, but the obvious option of having 80px top and bottom results in either too large a gap to the next section of content when the text is long, or too short a gap if the text is short.
I have an HTML table with two columns with some text in them. Clicking a link on the right column renders some content dynamically that increases the column length to more than double. This in-turn causes the text on the left column to expand and look ugly. Is there a way to keep the text on the left column in-tact despite the increased right column length?
I have a request to make a HTML/CSS 3-column layout that meets these criteria:
middle and right column have a fixed width
left column has a max-width
the 3 columns are horizontally centered
ff the browser's viewport gets shrinked and the left border of the left column touches the left border of the viewport, then, by further shrinking the viewport, the left column starts shrinking in width until width is 0. (like in this example, except for that here the left column also has a min-width).
I could not find such a layout. If it is possible, how do I achieve this? (Telling me, it's not possible, would also earn the checkmark).
Here is a guide to responsive layouts and another to some responsive frameworks you might consider using to achieve what you need to.
Generally it's good ettiqute on the stack network to try and create code yourself and then post specific questions if you get
stuck.
Please look at the following page in IE9..
www.homextreme.co.za/default_test.aspx
I have added borders on some of the tables for debugging purposes
On the left choose any region from the dropdown, the page will refresh..
On the right you will see there is now a gap below the table on the right.
I have googled for ages and searched for IE9 table bug fixes and tried them but for the life of me I cannot get that cell to size correctly. Can somebody please help me with a solution for this?
Link to screenshot before I expand the directory on the left.
Link to screenshot after...
Thanks
After making a selection from the list you get a long list on the left column. Since all the content is inside a bigger table (oy tables inside tables inside tables), the right column has to expand vertically.
In the right column there are two cells on on top of the other one (plus the one in the middle for spacing). The one in the top includes the table with the space you don't want, the cell in the bottom has a bunch of other smaller sections. The top cell expands vertically and ends up being taller than the content, and that's the extra space you see. If you change the vertical alignment (vAlign) of that cell (1st row, 3rd cell) to top, you'll see the space move to the top.
The reason it doesn't show up in other browsers is that they probably have different row height algorithms and make the 1st row as small as possible and leave the rest to the 2nd and 3rd. And then IE uses percentages or makes the rows proportional to the content or something.
I'm not sure what to suggest you do to fix this. If you're going to stick to tables for layout, just use one row and have a cell for each column, and keep the content of each column in the same cell instead of splitting it in rows.
I'd like to create a 3 column layout, with the middle being for all the content and menus and the other two being a solid background color.
I have something like this set up already, but the middle column doesn't extend to the bottom of the page. How can I get this middle column to extend to the bottom of the page?
Since most pure-CSS answers to this question are not supported by browsers, your best best is often to use a background image for this. Create the image with the right sized columns and apply it to whatever contains all three columns on the page. Make sure that the image can be horizontally repeated, and it will do so all the way down to the bottom of the page, even if the middle column is not actually the right size.
This site is really helpful for this sort of thing:
http://css.maxdesign.com.au/floatutorial/tutorial0916.htm
But I think the basic idea is you create a float:left div and then a float:right div and then another div for the middle.