Jonathan

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromJonathan
ToMe
Subjectavoid repeating image background in cell in IE
Date11 April 2006 02:18
Hello Mark Wilton-Jones,

I'm making a site  and have already tried setting up the layout in CSS then
moved to Tables because of problems with cross browser issues.

[URLs]

Layout is 'boxy' so overall box shapes surround content / side menu /
header.

Question:
side menu image: [URLs]
How to put image in table cell background without image repeating in IE ?
OR
How to fill cell with flash or fireworks graphic but keep position of table
cell at top of page.

Solution:
Page layout length extends as content added with box line shapes lengthening
with footer at bottom of page.

Problem:
CSS
- couldn't figure out how to prosition everything and keep box shape as
content extends length of page, so I moved to table setup.

Tables
- cutup layout using Fireworks, then opened in Dreamweaver and replaced
header with Flash header. -added 'top' positioning on all cells in table to
ensure images / layout stayed together, but positioning didn't seem to work
as several problems occurred:
---when side menu / blue box image was background in table cell, the image
repeated in IE.
---when side menu / blue box is kept as single image in table cell and the
height / width of image is added into cell info, the cell doesn't keep in
position at top of page.
---to avoid image repitition tried making table cell background image longer
at bottom, but doesn't work if wanting to extend page height more than image
length.
FromMe
ToJonathan
SubjectRe: avoid repeating image background in cell in IE
Date11 April 2006 09:20
Jonathan,

> I'm making a site  and have already tried setting up the layout in CSS
> then moved to Tables because of problems with cross browser issues.

Yes, there are times when minimal tables are still needed. However, it is
better to use tables as little as possible. Use CSS where possible, and just
use a minimised table for the column layout:
<table><tr><td>...</td><td>...</td></tr></table>

There is no real need for multiple nested tables, but if that is the way you
want to go, then that is your choice.

> How to put image in table cell background without image repeating in IE ?

Use CSS. The 'no-repeat' is the important part. Note that I do not
particularly care for IE-centric pages. This will work in _all_ CSS
supporting browsers, not just IE.

td#someid {
  background: white url(image.jpg) scroll no-repeat left top;
}

> How to fill cell with flash

I really must advise against this. Your page is currently totally
inaccessible to me and search engines. I browse without Flash. When I looked
at your page, I saw a lot of content, but absolutely no navigation. There
was no way for me to find other pages. I am certainly not going to enable
Flash to look at your page, I (and many other users) will simply go
elsewhere instead.

Even if you do not feel the need to cater to users who cannot use Flash - or
those who choose not to, you will still need to cater to search engines.
Google cannot understand your Flash either, so your pages will not be
indexed.

> - couldn't figure out how to prosition everything and keep box shape as
> content extends length of page, so I moved to table setup.

Multi-column can be difficult with CSS. display:table is perfect for what
you are trying to do, but since IE has still not bothered to implement it,
that cannot be reliably used. There are still several ways to do what you
wanted though.

Generally the easiest is to use floats. Set float:left on the first column,
and then have an element at the bottom of the other column that has
clear:left set. Typically this would be a footer, as is used on my own site.

The border between the left and right columns is produced by carefully
applying a left margin to the right column to make space for the left
column, then applying borders; a border to the right side of the left
column, and a border to the left side of the right column. These are done so
that they overlap, meaning that the border appears no matter which column is
actually longer.

Still, this is a lot harder than display:table would have been, so many
authors will use a minimal table just for the columns (to be nice to IE),
then use CSS for everything else.

> Tables

A mess indeed :)


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromJonathan
ToMe
SubjectRe: avoid repeating image background in cell in IE
Date11 April 2006 09:54
Thanks for the comments.

Regarding CSS and Flash.

Overall I design sites based on the market / client needs, which is why
you'll see many Flash based musician / media sites because their users will
have the flash plugin installed and like a more graphic oriented layout and
style.

CSS
I would prefer to use CSS *if* the PC IE browser would actually show layouts
according to the CSS standards. My site uses CSS and I have done other CSS
sites, but it wasn't working on the layout that I sent you.
Following standards is great, but tables actually show layouts more
uniformly in all browsers than CSS, so until that changes it's a difficult
option to get to work in IE.
If you know a solution for the layout I sent you that work in IE and forces
the footer / content DIV to extend as content is added then I'm all for it!

Flash
Over 97% of browsers use a flash plugin
[URL]
Most sites I design are for markets that are more design oriented than text
oriented. As a result, most of the site users already have their flash
plugin on.
There are options for being listed on search engines.
[URL]
Additionally, most ranking is done by being listed on many sites so format
of site isn't really an issue.
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.