Strange Table Behaviour

J

Jim S.

ok then, your best bet is to do this: and it will work like you want it.

<table border=1 width="100%" cellpadding=0 cellspacing=0>
<tr>
<td width="170" valign="top"><table width="170" border="1" cellspacing="0"
cellpadding="0">
<tr>
<td height="160">&nbsp;</td>
</tr>
<tr>
<td>Type here whatever you what. and it will accomodate it. </td>
</tr>
</table></td>
<td height="160"
valign=top><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
</td>
</tr>
</table>

Note: i put a border of 1 so u can see the nested table.

tell me if that what u want :)
Jim
 
C

Chaddy2222

Smiley said:
So, it's a bug in IE then?
I would actually think it's more just the way IE decides to display the
PX hight.
Okay, I wanted to put a background image in the top left cell that had a
height of 160. Unfortunately, in IE, the background image repeated itself
because it seemed to ignore the height property.
Specifying anything in PX is generally a bad idea no matter what you
decide to use for layout.
You should set the hight of the BG image to a % of the window, for
example, in your case you may want to set the hight to something like
2%. Try some different %'s and take a look at the code in IE.
Also, if you provide an url to a test page it does make it easyer for
us to diagnose your specific problem instead of just guessing what it
might be!.
The bottom left cell would be blank, and the right side cell would contain
text. I used <BR>'s in my example because I didn't want to reproduce the
text I was going to use here and using a bunch of <BR>'s takes much less
room than quoting Lorem Ipsum.
You should really use <p> </p>'s to seperate your text, especially if
you want to have it marked up in paragraphs.
<br> is for line breaks and so <p> works better for what you want to
do.
HTH.
 
N

Neredbojias

With neither quill nor qualm, Smiley quothed:
Okay, I wanted to put a background image in the top left cell that had a
height of 160. Unfortunately, in IE, the background image repeated itself
because it seemed to ignore the height property.

The bottom left cell would be blank, and the right side cell would contain
text. I used <BR>'s in my example because I didn't want to reproduce the
text I was going to use here and using a bunch of <BR>'s takes much less
room than quoting Lorem Ipsum.

This can be done with a bit of a ploy and a few conditions.

Absolutely position the content of the second cell (not the cell
itself.) Put the content in a <div> and just position it "absolute".
You will also need one other thing _outside_ the div to establish the
2nd cell's exigency; I suggest an "&nbsp;" at the end. Table borders
should be off; if you need borders, style other containers, etc.
Padding and trim I leave up to you.
 
M

Mitja Trampus

Smiley said:
I also want to put writing overtop of the image in it's vertical center.

Verticl centering can admittedly be a PITA. vertical-align
property is only allowed for elements with
display:table-cell [1] and IE doesn't support table-cell for
anything but TDs.
There are hacks with margins and padding with which you can
avoid tables for alyout, but I still think a nested one-cell
160x170 table is the cleanest / least ugly solution here.


[1] and inline elements, but not in a way you could use here
 
M

Mitja Trampus

dorayme said:
Why do you include

html,body
{
margin: 0;
padding: 0;
}

Makes no difference in any of my browsers whether this is in or
left out.

Nonzero default margins for body are (were?) not uncommon.
Under what circumstances does it become important to give specs
for html? What a queer concept, assigning margins to the html!

Though not directly related to your rhetorical question,
this might be of interest:
http://www.quirksmode.org/viewport/experiments.html
 
D

dorayme

Wÿrm said:
"Smiley" <[email protected]> kirjoitti
viestissä:[email protected]...



If it's ALL that you want image in top left but nothing under it, why don't
you do something like this...
http://www.kolumbus.fi/ace/ng/image-in-top-left.html ? Just set image in
body background and use padding on left, that is.

Why do you include

html,body
{
margin: 0;
padding: 0;
}

Makes no difference in any of my browsers whether this is in or
left out.

Under what circumstances does it become important to give specs
for html? What a queer concept, assigning margins to the html! I
obviously have not got my head around this seeming abstraction?

(Just btw, left-margin is better at 180 as the 10px you allow
still jams the text up to the pic, I mention in case there is an
informative browser issue here...)
 

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

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,265
Latest member
TodLarocca

Latest Threads

Top