17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1034 Views |
-
Semi-fluid layout?

21 February 2008 at 8:22am Last edited: 21 February 2008 8:25am
Is it possible to make a div resize according to the browser window, but only within sertain limits? using only css that is.
Also, is it possible to tell a table to never get any wider than its parent width so that it will never get outside that box?
Edit: joomla.org is a good example of what I mean with semi-fluid layout, and it works with js disabled, so css should probably be enough.
-
Re: Semi-fluid layout?

21 February 2008 at 1:59pm
Is it possible to make a div resize according to the browser window, but only within sertain limits?
Depending upon your needs, you could set the div a width in percentage, and then put min-width and max-width to your certain limits, eg. ems.
However, take note that IE 6 and former do not respect min-width and max-width.
Is this the kind of thing you were after?
Also, is it possible to tell a table to never get any wider than its parent width so that it will never get outside that box?
OK I am no table expert, but surely that should be standard unless it cannot (the content of the table cannot wrap smaller)? What are you experiencing?
NB. Use tables only for tabulated data, not for layout.
-
Re: Semi-fluid layout?

21 February 2008 at 11:52pm
Is this the kind of thing you were after?
It probably is, though I haven't tested it yet.About tables, it is possible to make tables in the cms, and its also possible to make the width wider than the avaliable content area. This could get a big problem, when for example changing themes to a less wide theme.
This leads to another question: maybe silverstripe should support xhtml/html fragments? That would be located in the themes as a fragments subfolder and would be ss templates, for example table.ss. This would allow a great deal of customizeability of the markup itself.
-
Re: Semi-fluid layout?

23 February 2008 at 2:54am
Just wanted to inform anyone intersted that I solved the table issue by adding
table {
max-width:100%;
}to layout.css.
I have also confirmed that the "joomla-style" page width is possible using the css posted above, so thanks for the help!
| 1034 Views | ||
|
Page:
1
|
Go to Top |

