Board index PBase HTML and Style Sheets Different background color for the gallery and image?

HTML and Style Sheets

Different background color for the gallery and image?

Customize your galleries.
terriwu
 
Posts: 28

Different background color for the gallery and image?

Post Tue Jan 06, 2004 4:29 am


Does anyone know if it's possible to use a stylesheet (I use alexc) and then when the viewer goes to see just one photo the background color changes (I'd like for some photos to have a black background when the photo - not the gallery - is viewed in full.

Possible?

alangrant
 
Posts: 861


Post Tue Jan 06, 2004 8:10 pm


I only have a partial solution for this - perhaps some CSS expert can improve on it.

You could try adding this code to your stylesheet

Code: Select all
div#imagepage
{
  background-color: black;
}


This will create a black background for most of the page below the menu bar. There is a slight problem though - it doesn't work on the "x page views since..." bit, which will continue to use the original colour. Depending on the colours you are using, this can produce a slightly odd-looking strip at the bottom of the page.

An alternative approach might be to use a wide black border around your image. To do this, place the following code in your stylesheet (I use this in my galleries). Experiment with changing the 15 pixel setting:

Code: Select all
IMG.display
{
  border 15px solid black;
}


Hope this is of some help.
Alan
Travel Photos - http://www.pbase.com/alangrant
Balkanology: Explore Southeast Europe - http://www.balkanology.com/


Board index PBase HTML and Style Sheets Different background color for the gallery and image?

Who is online

Users browsing this forum: ClaudeBot and 1 guest