PDA

View Full Version : Trying to find a way to reference the Body Background value...


KW802
08-01-2004, 04:20 AM
I'm stuck on a problem and I'm hoping some of you template gurus can help me out.

Here's my problem summarized: In a table that is inside of a table I have a TD element that I want to have the same background as the "Body Background" value for the style.

I've already concirmed over on VB.com that there is no phrase that corresponds to the value of the "Body Background" value box as it is implemented via the CSS that is called from global.php so the easiest solution isn't available to me.

Any thoughts on how else I could reference that value without having to hard-code my template?

Thanks,
Kevin

Zachery
08-01-2004, 04:40 AM
Why not just use class="body" ?

KW802
08-01-2004, 04:54 AM
Why not just use class="body" ?
HHhmm...... doesn't seem to work; I'm getting the page defaults instead. Would it still work if the table that the TD element is in is using a class tag?

Zachery
08-01-2004, 07:03 AM
No, if it is already assigned a class, you need to use the style tag.

Natch
08-02-2004, 12:47 AM
You can also do it client-side using the DOM... you would need to do it in javascript, by assigning an id tag to the table cell in question, then changing that id using id.background = document.body.background or something similar...

OK - your TD needs to read <td id="bodied" ... and then you will need to write a javascript which is called in the onload for that page - I would need more info on where in your vB you are using this to be able to advise you further.

When you say "same background" do you mean background image, or background color, or the whole background definition?