Closed Thread Icon

Preserved Topic: Another quickie (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=20534" title="Pages that link to Preserved Topic: Another quickie (Page 1 of 1)" rel="nofollow" >Preserved Topic: Another quickie <span class="small">(Page 1 of 1)</span>\

 
njuice42
Paranoid (IV) Inmate

From: Gig Harbor, WA
Insane since: Feb 2002

posted posted 06-26-2002 04:17

Trying to get a image background into a table cell, but can't find where I'd put the code for it. Is it where the table itself opens? In the cell's tags? I know, it's a simple question, but it's buggin' me. Thanks!

njuice42 Cell # 551
icq 957255

synax
Maniac (V) Inmate

From: Cell 666
Insane since: Mar 2002

posted posted 06-26-2002 04:22

<td background="image.gif"> ... </td>

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 06-26-2002 04:23

Putting it in the table itself makes it the background for the *whole* table, except for NN4 which has a bug.

You might also use

(style sheet
td#theonewithabackground {
background:url(thingy.jpg):
}

(html
<td id="theonewithabackground">...</td>

njuice42
Paranoid (IV) Inmate

From: Gig Harbor, WA
Insane since: Feb 2002

posted posted 06-26-2002 05:26

Woohoo! Thanks guys, done fixed it all up.

I really should start learning more advanced forms of web design, I'm a long way from stylesheets hehe

Edit:

One more tiny little Q if I could. Now that I'm using my snazzy new background, the text isn't visible with the first 20 pixels on the left (due, well, to the background hehe)... so I'm thinking I need to toss a margin in. In an attempt to figure it out for myself, I searched these dusty halls for html margins and came up with CSS... is this the hint that I'm just not taking, can it only be done in CSS? If not, how can I add a simple 20 pixel margin from the left of the cell?

*bows* I am putty, mould me as you see fit

njuice42 Cell # 551
icq 957255

[This message has been edited by njuice42 (edited 06-26-2002).]

WebShaman
Maniac (V) Mad Scientist

From: Happy Hunting Grounds...
Insane since: Mar 2001

posted posted 06-26-2002 07:59

Well, a transparent .GIF will work...in all browsers....

Or ; & n b s p remove the spaces (repeat as necessary...)

Of course, I think CSS is a great thing to learn...esp. nowdays...and is the next step to DHTML...





[This message has been edited by WebShaman (edited 06-26-2002).]

njuice42
Paranoid (IV) Inmate

From: Gig Harbor, WA
Insane since: Feb 2002

posted posted 06-26-2002 10:17

Aye, it's looking like the hints are smackin' me in the forehead and I'm not getting em, hehe. I'll take a look around, learn a little bit. Judging from the past threads on the subject, I take it you can use both CSS and HTML in the same document, correct?

njuice42 Cell # 551
icq 957255

WebShaman
Maniac (V) Mad Scientist

From: Happy Hunting Grounds...
Insane since: Mar 2001

posted posted 06-26-2002 10:20

Yes...and no. You can create a CSS page that can be used by all your HTML pages, just by referencing it from the normal code on the page...this saves a lot of time with changes, because you only have to change the CSS page, and not tons of pages...

Of course, you can also include the CSS in the HTML page...but for really big sites, it's much better (and easier!) to create a seperate page for the CSS.

And for the 'blank' .GIF....here is how you use it...

<IMG height=1 width=20
SRC="/images/blank.gif" alt="">

Just create a transparent .GIF of one pixel...and name it blank.gif and use the height and width tags to set the distance for your 'indenting'...directly in the TD (but after the tag)..and Presto! There you have it...neat, is it not?

[This message has been edited by WebShaman (edited 06-26-2002).]

[This message has been edited by WebShaman (edited 06-26-2002).]

kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

posted posted 06-26-2002 11:58

Or, if you want to use CSS and have everything that needs a 20px padding on the left side in <p> tags:

td p { padding-left: 20px; }

That would also avoid those terrible transparent gifs.

If you want to learn more about CSS which is always a good idea, have a look through the FAQ, it contains some good links!

kuckus (cell #282)

njuice42
Paranoid (IV) Inmate

From: Gig Harbor, WA
Insane since: Feb 2002

posted posted 06-26-2002 13:03

Off to the FAQs I go, time to learn me a new language.

Thanks for answering my questions (my many, many questions...) all, it's been a big help!

*slithers out, stage left*

njuice42 Cell # 551
icq 957255

« BackwardsOnwards »

Show Forum Drop Down Menu