As I understand it the only thing that will force the outer columns to stay intact regardless of varying width content is a table - or display: table properties
The problem with the code above of course is that IE6/7 don’t support it…
min-width isn’t an option either as the content will be of varying widths and I need to make it unbreakable.
The first example breaks at smaller sizes - The elements don’t wrap to contain their children.
The red element sits on top of the purple, the green element shrinks into nothingness.
This causes overlap of elements in the columns and isn’t desirable.
Whereas the second example can take a kicking and hang together quite well forcing a horizontal scroll bar when necessary.
Hmm, I get the feeling other members here won’t give up so easily
Consider the challenge set - After all this time tables are still a necessary evil. Still for some time I imagine if we need to wait until IE6 and 7 can be forgotten about.
Edit: I’m not saying I think you have given up too easily - There may well be no good solution to this.
As I mentioned there I got close with IE6 but IE7 was hopeless.
Yeah, I haven’t cracked it yet. But stranger things have happened before in the forum
originally posted by Paul O’B -The second part of the quiz is to get something to work in IE7 and as you can see from the screenshot I have a working example. However the layout in IE7 wouldn’t really be useful in real life for a number of reasons but it’s a good test all the same.
EDIT:
Ahh, no edits allowed. I already quoted you. Just kiddin, go ahead and try though.
I should say that this really is an exceptional case - Very-nearly-almost-always you can achieve any design without the help of a table tag - They should really only be used to mark up tabular data.
Yeah, I haven’t cracked it yet. But stranger things have happened before in the forum
That’s right! I’m still working on float:bottom; every now and then.
I hope to crack it before it actually becomes a real value.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.test {
writing-mode:lr-bt;
text-align:justify;
width:50%;
margin:auto;
padding:10px;
border:5px solid red;
}
span {
width:100px;
height:100px;
float:right;
background:red;
margin:10px 10px 0;
}
</style>
</head>
<body>
<div class="test">
<p><span>float</span> text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text</p>
</div>
</body>
</html>
Yes I had seen that when you showed James Hopkins how float bottom should work.
I can keep the float where I want it at all times but I have to put it in an AP parent which kills the text flow (same theory as the js float pusher). If there was just some way to have an in flow parent that would stay at 100% height we might be able to pull it off.
Yes, it’s a connundrum The 1px float pusher that has a height 100% (via js) is the only way that really works for all.
This works in Firefox 3.5 but other browsers don’t like it (not sure why yet).
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Float Bottom 1</title>
<style type="text/css">
h1{text-align:center;}
body{line-height:1.2}
.test {
text-align:justify;
width:50%;
margin:auto;
border:4px solid red;
height:105px;
display:table;
line-height:25px;
background:#EEE;
}
.test p {
margin:0;
padding:10px;
}
b {
float:right;
width:3px;
height:100%;
margin-bottom:-115px;
display:table;
}
span {
width:98px;
height:98px;
float:right;
border:2px solid red;
margin:0 5px 0 5px;
clear:right;
position:relative;
}
</style>
</head>
<body>
<h1>Float bottom in Firfefox 3.5 only</h1>
<div class="test"> <b></b><span>float</span>
<p> START text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text END</p>
</div>
</body>
</html>
This works in Firefox 3.5 but other browsers don’t like it (not sure why yet).
That’s pretty slick Paul!
It’s working in FF3 for me too. Other browser don’t seem to be inheriting the height to the “b” table. The only way I can get them to take any height (other than an explicit height) is by adding some top padding to it.
That is definitely something to keep working with.