bg color on linked images

  • SB
  • Moderator
  • Genius
  • User avatar
  • Joined: Nov 16, 2004
  • Posts: 8676
  • Loc: Aberdeen, Scotland
  • Status: Offline

Post May 8th, 2008, 6:15 am

Normally when i would send a link to people showing a certain image whether graphic or photograph the default background colour would be white. In CSS is there any code i could use to not only alter the background colour on the screen surrounding all .jpg, .gif and .png files. It would also be good if the said images would appear central on the screen as well.

Any help here is appreciated.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 8th, 2008, 6:15 am

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post May 8th, 2008, 8:04 am

well the problem is that if you link to an image file its up to your browser to interpret what to do with said file. Your not actually wrapping the image in any style able html. The browser is just using its defaults.

The way around this is to build a generic php, asp, etc page that has an html shell and then dynamically loads an image. So in my case I simply link to the image thus
Code: [ Select ]
href="show.asp?img=myimgname.jpg"
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com
  • SB
  • Moderator
  • Genius
  • User avatar
  • Joined: Nov 16, 2004
  • Posts: 8676
  • Loc: Aberdeen, Scotland
  • Status: Offline

Post May 8th, 2008, 8:19 am

It's funny because at no point did that option cross my mind. It makes a crap load of sense too.

This is what happens when you've got so much to do that you try and look at shortcuts that are perhaps not as "shortcutty"* as you'd think.







*i'll dictionary.com an actual word later on which suggests what i was trying to say here.
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post May 8th, 2008, 8:34 pm

:lol: I hear you SB. I do the same thing so many times...
"Bring forth therefore fruits meet for repentance:" Matthew 3:8

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 136 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.