table cell background image - not movable

J

Joe Butler

I've seen sites with background images that don't scroll with the site's
text etc.

Is it possible to define a background image for a single table cell that
does not scroll with the table.

My site is layed out using a table, where the lower-right cell is the page's
content. I want this cell only to have a non-scrolling background.

Thanks.
 
S

Sid Ismail

: I've seen sites with background images that don't scroll with the site's
: text etc.
:
: Is it possible to define a background image for a single table cell that
: does not scroll with the table.
:
: My site is layed out using a table, where the lower-right cell is the page's
: content. I want this cell only to have a non-scrolling background.


For that cell,
<td class="background: #00FF00 url(stars.gif)
no-repeat fixed center center;">

Sid
 
J

Joe Butler

Thanks...

.... but that does not work. I get no background at all with it. Are you
sure this is not malformed.
I'm pretty inexperienced with html, so I'm not going to notice if you've
missed obvious things out.

<td class="background: #00FF00 url(stars.gif) no-repeat fixed center
center;">
 
B

Beauregard T. Shagnasty

Joe Butler pounced upon this pigeonhole and pronounced:
Thanks...

... but that does not work. I get no background at all with it. Are you
sure this is not malformed.
I'm pretty inexperienced with html, so I'm not going to notice if you've
missed obvious things out.

<td class="background: #00FF00 url(stars.gif) no-repeat fixed center
center;">

Needs to be style instead of class.

<td style="background: #00FF00 url(stars.gif) no-repeat fixed center
center;">

...or put it all in your stylesheet, and _then_ use class.
 
S

Sid Ismail

On Mon, 20 Oct 2003 23:55:58 GMT, Beauregard T. Shagnasty

: Needs to be style instead of class.
:
: <td style="background: #00FF00 url(stars.gif) no-repeat fixed center
: center;">


right - apologies... braindead here...

Sid
 
D

David Dorward

Sid said:
For that cell,
<td class="background: #00FF00 url(stars.gif)
no-repeat fixed center center;">

* Should be style not class
* Internet Explorer is broken and can't handle 'fixed' properly for anything
other then the <body>
 
T

Toby A Inkster

Joe said:
still does not work.

background is fixed solid within the cell.

Internet Explorer only supports fixed backgrounds on <body> -- not on
table cells or anything else.

Most other browsers should handle it fine though.
 
S

Sid Ismail

: * Internet Explorer is broken and can't handle 'fixed' properly for anything
: other then the <body>

Nice to know.. thanks! :)

Sid
 
J

Joe Butler

Thanks for all your help.

Since I've only got IE installed and do not really want to install Netscape
et al, I think that I'll leave this aspect as it is - even though I
particularly like non-scrolling backgrounds - otherwise I'll only break it
one day and never notice anything's gone wrong.

Also...
My site is layed out using a table

I've looked at the link, and will examine it in more detail at some time.
Yet, I can't immediately see why I should not use tables. If I can achieve
a particular task with one piece of multi-use knowledge, why should I bother
to learn the alternative? Tables are more straightforward are they not?

Simply because something was not designed for a particular task should not
mean it is dismissed out of hand for that task. Take as an example, a
lemonade bottle - you can store cleaning fluid, bleach and other chemicals
in it. Put it in your kitchen cupboard, and bob's your uncle. Okay, bad
example, but I'm sure no one here opens paint tins with an 'Acme Paint Tin
Opener', we use a screwdriver.

So, in a nutshell, what's wrong with using tables for layout?

Thanks,

Joe
 
A

Adrienne

Thanks for all your help.

Since I've only got IE installed and do not really want to install
Netscape et al, I think that I'll leave this aspect as it is - even
though I particularly like non-scrolling backgrounds - otherwise I'll
only break it one day and never notice anything's gone wrong.

You should install different browsers for several reasons:
1. Be able to see what a page is behaving in various browsers, for example,
IE will still render <img src="\images\myimage.gif"> while other will not.
By testing in another browser, you can catch errors like this.

2. See what you're missing. For example, IE does not honor position:fixed,
but other browsers do. Actually, there are a lot of things that IE doesn't
do.

3. Other browsers have more features that do not require plugins, for
example, Opera has built in pop-up stopper, and Google search already comes
with it.
Also...


I've looked at the link, and will examine it in more detail at some
time. Yet, I can't immediately see why I should not use tables. If I
can achieve a particular task with one piece of multi-use knowledge,
why should I bother to learn the alternative?

It's always a good thing to learn. Why are you sticking your head in the
sand?
Tables are more
straightforward are they not?

Tables are a PITA to debug. When I switched from table layouts to CSS
positioning, I was thrilled.
Simply because something was not designed for a particular task should
not mean it is dismissed out of hand for that task. Take as an
example, a lemonade bottle - you can store cleaning fluid, bleach and
other chemicals in it. Put it in your kitchen cupboard, and bob's your
uncle. Okay, bad example, but I'm sure no one here opens paint tins
with an 'Acme Paint Tin Opener', we use a screwdriver.

So, in a nutshell, what's wrong with using tables for layout?

Use the right tool for the job. If you have an ACME Paint Tin Opener, then
use it. If you don't, use a screwdriver. Point is, you DO have an ACME
Paint Tin Opener, and you refuse to learn how to use it.
 

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
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top