Forum Moderators: open

Message Too Old, No Replies

         

junbin

12:44 pm on May 15, 2002 (gmt 0)

10+ Year Member



If you use opera 6 and put the following code:

<table><tr align="center"><td>
<table><tr><td>test</td></tr></table>
test2
</td></tr></table>

The word "test" will be left-aligned and the word "test2" will be right-aligned. Is this a bug or a "feature"?

and if you put:
<table><tr><td background="test.gif" width="100"></td><td background="test2.gif">test 2</td></tr></table>

in NN4, the first cell will have NO background image, while the second one will have test2.gif as the background... another bug or feature? :p

ps: if you know of a simple/elegant way of fixing these, please post them.. thanks :)

idiotgirl

1:45 pm on May 15, 2002 (gmt 0)

10+ Year Member Top Contributors Of The Month



NN4 will not render a background image in an empty table cell. You must insert either a
nbsp;
, a
<br>
, a paragraph, an image... something to put in that cell to render the background image. (One reason the 1x1 pixel .gif became so popular!)

With Opera - I'm guessing since there is nothing separating the table from the phrase - the word is being rendered after the table - so even though it's a centered parent cell you've nested your table in - the word will align immediately following the table you've nested within that cell.

You might try the

<br>
tage immediately following the table, or place the table in its own div as well as the following words in a separate div.

<added> and it wouldn't hurt to specify your cell height and width sizes for your background image'd cell, either. </added>

junbin

3:21 pm on May 15, 2002 (gmt 0)

10+ Year Member



The nested table won't be aligned center no matter what you add before/after it.. after some testing, I found that the only way to make the table center is to put the "align='center'" tag in the <td> bracket.. so it reads:

<tr><td align="center">

instead. It's beginning to look more and more like a bug. :p

Brett_Tabke

3:32 pm on May 15, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



If I recall correctly on this one, they are accounting for NN4 center behavior. Try:

<table>
<tr><td>
<center>
<table><tr><td>test</td></tr></table>
</center>
this is a test
</td></tr></table>

mivox

5:00 pm on May 15, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey all, I'm moving this thread over to our Browsers & HTML forum... It really seems like a better fit there! :)

jatar_k

5:13 pm on May 15, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



as far as aligning the nested table goes

<table>
<tr><td align="center">
<table><tr><td>test</td></tr></table>
this is a test
</td></tr></table>

just put the alignment in the cell

NN4, as idiotgirl said, does not render empty cells. I use a <spacer type="block" width=x height=y> the only reason this is better than a nbsp; is that you can adjust the size to whatever you need to show your bg image. I would also put a height and width in the td just so no browsers get confused and that should work for everyone. You could also just put the image into the cell and that will make it whatever size you need and since there isn't anything else inside it shouldn't matter.