SitePoint Sponsor |
|
User Tag List
Results 1 to 12 of 12
Thread: background in a cell
-
Jul 10, 2001, 11:11 #1
- Join Date
- Apr 2001
- Location
- BC, Canada
- Posts
- 630
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
background in a cell
Hi all
I have a background in a cell, but it keeps repeating..how can I stop this from happening?
-
Jul 10, 2001, 13:31 #2
There was a post on this previously. Try:
<td background="background" style="background-repeat:no-repeat">
That should work.
-
Jul 10, 2001, 14:26 #3
- Join Date
- Oct 2000
- Location
- Nashvegas Baby!
- Posts
- 7,845
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You cannot reliably stop tiling from happening. The best thing to do would be to create your image so that when it does tile it is not noticeable.
Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes
-
Jul 11, 2001, 05:48 #4
- Join Date
- Mar 2001
- Location
- Madison, Wisconsin
- Posts
- 42
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Instead of using a combination of html attributes and css, try using just the css.
<td style="background-image: url('myimage.gif'); background-repeat: no-repeat">
background-image is very widely supported on CSS browsers, as is background-repeat: no-repeat
-
Jul 11, 2001, 06:15 #5
- Join Date
- Jun 2001
- Location
- Before These Crowded Streets
- Posts
- 9,446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
create the graphic to be as big as the cell will be. I do all my backgrounds this way. The negative part is that on really big graphics, image size can get quite large. Still working through this myself, though...
Sketch
-
Jul 16, 2001, 08:16 #6Originally posted by Sketch
create the graphic to be as big as the cell will be. I do all my backgrounds this way. The negative part is that on really big graphics, image size can get quite large. Still working through this myself, though...
Sketch
-
Jul 16, 2001, 08:21 #7
- Join Date
- Jun 2001
- Location
- Before These Crowded Streets
- Posts
- 9,446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
yeah, it could. guess it depends on what the graphic is. I usually design my page backgrounds to fit at 1200x1024. Also, scripting could be used to determine display size and based on display size, have the bg set at diff sizes.
Sketch
-
Jul 16, 2001, 08:22 #8
- Join Date
- Jun 2001
- Location
- Oklahoma
- Posts
- 3,392
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
If you're hellbent on using liquid tables (i.e. percentages), use them on an outside table. Then, within that, use another table, only this time make it absolute by using pixels, the exact same dimensions as the image. That will stop your cross-browser/resolution compatibility problem while still giving you the background effect you're looking for. =)
Colin Anderson
Ambition is a poor excuse for those without
sense enough to be lazy.
-
Jul 16, 2001, 19:41 #9
- Join Date
- Jul 2000
- Location
- Singapore
- Posts
- 2,103
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Doug Baker
<td style="background-image: url('myimage.gif'); background-repeat: no-repeat">
It will not work in macintosh ie browsers. neither is it of standards with w3c."Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein
-
Jul 16, 2001, 20:22 #10
- Join Date
- Apr 2001
- Location
- Nottingham, England.
- Posts
- 209
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Odd I don't even use the quotation marks. It works fine in NN and IE. Is it even compliant?
Absence of evidence is not evidence of absence.
-
Jul 17, 2001, 02:13 #11
- Join Date
- Jun 2001
- Location
- Edinburgh, UK
- Posts
- 51
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
There is a bug with netscape when you apply an image as a table background - it will be repeated in each table cell, rather than over the whole table.
The trick to get it to work in Netscape as well as IE is to make a one cell table with the background image, then within that table make your many cell table, *but* put a 1x1 transparent gif image as the background image of the nested table. It's a strange work around, but it will then display correctly.
Here's some example code:
Code:<table width="200" background="background.jpg"> <tr> <td> <table width="200" background="invisible.gif"> <tr> <td>Cell1</td> <td>Cell2</td> </tr> <tr> <td>Cell3</td> <td>Cell4</td> </tr> </table> </td> </tr> </table>
Become Interactive because its all gone a bit subBlue
-
Jul 17, 2001, 02:46 #12
- Join Date
- Jul 2000
- Location
- Singapore
- Posts
- 2,103
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by paroxysm
Odd I don't even use the quotation marks. It works fine in NN and IE. Is it even compliant?
no quotations is the right way to go."Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein
Bookmarks