bg color on linked images

  • SB
  • Moderator
  • Genius
  • User avatar
  • Posts: 8740
  • Loc: Aberdeen, Scotland

Post 3+ Months Ago

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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

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"
  • SB
  • Moderator
  • Genius
  • User avatar
  • Posts: 8740
  • Loc: Aberdeen, Scotland

Post 3+ Months Ago

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
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

:lol: I hear you SB. I do the same thing so many times...

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 53 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
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.