Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

blaklaybul

macrumors regular
Original poster
Aug 29, 2007
167
0
New York City
Im working on a simple dreamweaver site and I want to know how to change the background color of the html pages that open when I have a image linked.

I dont want to have a make a separate html page for each image and then modify that page...
Is there a simpler way?
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
The background color on pages when you're viewing an image directly is controlled at the browser level, not the design level. Just check your browser preferences and you'll find it.

Another option you have is to use JavaScript to view the image on the current page. See any of the LightBox clones for examples as to how this works. Likely you've already seen it in action on other sites.
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
That one works. As a said before, it's a browser setting. I changed Firefox's background color and that white went black. That area is showing just an image, not an HTML page, which can have its colors modified.

The page would need to be redesigned so it's not using those frames. JavaScript would be a decent choice here. You could also try using an iframe, which has a little more control, but I don't really recommend that.

Edit:
Here's a JavaScript powered gallery that has a similar look and feel to your current page.

Edit2:
Actually, there just may be a way. From this page, there's a discussion covering ways to do it in Firefox and IE, though I've never tested these. On your frame tag for the image add the following two attributes.
Code:
style="background:#000;" allowtransparency="true"
The second attribute isn't standard though, so it won't validate, and I'm not sure how other browsers will handle these.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.