Peter,
On Nov 25, 2006, at 12:54 PM, Jazzcreation wrote:
> In fact I want to make a 30px high strip divide into 4 divs, first
> a 20px
> wide block, then a 100px wide block, then a block taking up the
> rest of the
> width, with a 1px stripe on top.
>
> In trying to make up an example, I discovered that the following
> code works.
> I didn't realise the RH divs would float up without specifically
> being given
> "float" property (which stops them filling the width). Is this a
> reasonable
> way of doing it?
>
>
> <div>
> <div style="float:left;height:30px;width:20px;background-
> color:yellow;">
> </div>
> <div style="float:left;height:30px;width:100px; background-
> color:green;">
> </div>
> <div style="height:1px;background-color:red;">
> </div>
> <div style="height:29px;background-color:rgb(182,194,194);">
> </div>
> </div>
What you have will work. It can be simplified even more...
<div>
<div style="float:left;height:30px;width:20px;background-
color:yellow;"></div>
<div style="float:left;height:30px;width:100px; background-
color:green;"></div>
<div style="height:29px;background-color:rgb(182,194,194); border-
top: 1px solid red;"></div>
</div>
However, web pages aren't filled with empty colored squares. The
first question is really "What is the content/organization of this
page?" The answer to that question will influence the method you
choose to get the page to look the way you want. Web pages are
amazingly flexible, and the user is ultimately in charge. If we
fight against the nature of the web, we pull our hair out, and our
users go away unhappy.
--
Roger Roelofs
"Remember, if you’re headed in the wrong direction,
God allows U-turns!"
~Allison Gappa Bottke
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/