Jump to content

Reading background color from other pages


bharris

Recommended Posts

I am building a table of links.  I would like each cell of the table to have the same background color (no images, just standard colors) of the page that is linked to in that cell.  Seems fairly simple, read the background color of the body tag on the referred to page and plug that value into the background color property of the cell.  I am just not skilled enough yet (fairly new to PHP).

 

On the surface, it seems fairly straightforward.  Is it?

 

Thanks

Actually that's in no way straightforward. There are a number of ways in which the background color may be set. You'd have to consider the bgcolor attribute on the body tag. You'd also have to consider CSS and the way selectors are given weight according to the CSS specification as well as the fact that numerous stylesheets may have conflicting information, and in that case you'll have to figure out which one should be the correct one.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.