A simple problem to solve - div height!

R

richard

First of all, there will be no URL posting for this. Period.

I just want to know how I can cause the left column height to match the
right column in case of word wrapping? Remove the <br> and you'll see what
I mean.


<body>

<div style="border:solid 2px #00f; width:30em; height:auto;">
<!-- Row 1 header-->
<div style="height:auto;">
<!-- Left column -->
<div style="width:2em; height:100%; background:#eee; float:left;">
x
</div>

<!-- Right column -->
<div style=" background:#ffff7a; height:100%;">
What is the question of the day <br> you ask?
</div>
</div>

</div>

</body>


I feel if you're to lazy to copy and paste the code into an editor, you
should just keep quiet.
 
R

rf

richard said:
First of all, there will be no URL posting for this. Period.

Yes sir. Right sir. Would you like fries with that sir?
I just want to know how I can cause the left column height to match the
right column in case of word wrapping? Remove the <br> and you'll see what
I mean.

Why would you want to?
<body>

<div style="border:solid 2px #00f; width:30em; height:auto;">
<!-- Row 1 header-->
<div style="height:auto;">

Why sepecify height: auto:. It's the default.
<!-- Left column -->
<div style="width:2em; height:100%; background:#eee; float:left;">

100% of what? The element is floated, what is it's containing element that
it will be 100% the height of? Any guess will do.
x
</div>

<!-- Right column -->
<div style=" background:#ffff7a; height:100%;">

Once again 100% of what? Do you really know?
What is the question of the day <br> you ask?
</div>
</div>

</div>

</body>


I feel if you're to lazy to copy and paste the code into an editor, you
should just keep quiet.

And if you feel that you are too lazy to provide us with a URL so we don't,
and each and every one of us, have to go to all the trouble to copy/paste
this elementry code into an editor and then find somewhere to save it, and
so clutter even more our local storage, so a browser can then look at it
then *you* are just too much trouble and don't even deserve an answer.

BTW the answer you request has been provided here and elsewhere hundreds of
times. I can think of at least five ways of doing it without even thinking
hard. Much less harder than all that copy/paste/save stuff would cause me to
think.

STFW.

And if you don't understand what that means then STFW.
 
T

Travis Newbury

First of all, there will be no URL posting for this. Period.

Man, you sure do know how to get us to just jump through hoops for
you...
I feel if you're to lazy to copy and paste the code into an editor, you
should just keep quiet.

Mum's the word here...
 
R

Roy A.

First of all, there will be no URL posting for this. Period.

I just want to know how I can cause the left column height to match the
right column in case of word wrapping? Remove the <br> and you'll see what
I mean.

<body>

<div style="border:solid 2px #00f; width:30em; height:auto;">
 <!-- Row 1 header-->
 <div style="height:auto;">

 <!-- Left column -->
 <div style="width:2em; height:100%; background:#eee; float:left;">

<div style="width:2em; height:100%; background:#eee; display: table-
cell">
 
R

rf

STFW.
And if you don't understand what that means then STFW.

I like that a lot.

<grin/>

How was the left-over turkey? Turkey and cranberry sauce sandwiches, with a
sheat of iceberg lettuce, go down a treat.
 
B

Beauregard T. Shagnasty

richard said:
First of all, there will be no URL posting for this. Period.

RtS: lazy bastahd.
I just want to know how I can cause the left column height to match
the right column in case of word wrapping? Remove the <br> and you'll
see what I mean.

<snip fragment - too much is missing>
I feel if you're to [sic] lazy to copy and paste the code into an
editor, you should just keep quiet.

Yeah, that's the attitude that will get you help. It's you that is lazy.
 
R

richard

<div style="width:2em; height:100%; background:#eee; display: table-
cell">

Thanks. Played around with some variations and it still would not show
properly. The only way I could find to cure it was float both div's.
 
J

Jonathan N. Little

richard said:
First of all, there will be no URL posting for this. Period.

I just want to know how I can cause the left column height to match the
right column in case of word wrapping? Remove the<br> and you'll see what
I mean.

<SNIP CODE>

Use a table.

BTW this question as been asked in one form or another countless times
in this NG, e.g., "how to make my columns the same height"
 
D

dorayme

richard said:
First of all, there will be no URL posting for this. Period.

Yes, fair enough, bad time of the month for you eh...
I just want to know how I can cause the left column height to match the
right column in case of word wrapping?

One way to do this is to float something left and either give it a width
or simply note its natural width if it has one (a picture, for example).
Next, give the element destined for the right (if it is not to be
floated) a left margin equal to or perhaps a wee bit more (for grace) to
the width of the float.

Try that and come back to say if this is enough to get you going or if
it is not quite doing the job you want. Please, under no circumstances,
post a URL. If you feel any sudden urge, that's OK. But don't act on it.

Let this thread be a special url-free zone. Let it be like a fire in
which we forge our plain text skills. And let us emerge ready to
conquer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top