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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.