Jump to content

css help on conditional image selection


pdkv2

Recommended Posts

Hello board,

i am a new to css

i have a web page in which i am setting the logo for the site

the logo may be one of the files like logo.jpg, logo.gif, logo.bmp or logo.png

one of the above files will be available(the extension may be any of above) in images folder and i have to use that logo file for display.

means if logo.jpg is available then display logo.jpg else if logo.gif is available then disply logo.gif and so on.

please help me to sort out this problem.

 

Thanks in advance.

Sharad.

Link to comment
Share on other sites

Is it really such hardship to just put this in when you develop your project?

 

The logo for the site is something that I would assume is identical on every page - so just select the image and type it in your css.

 

In order to set this kind of thing dynamically as you have asked - you'd need some server side code to look in a directory and pick he file for you and then update the css file by putting the path to that image in - something pretty pointless IMO.

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.