473,395 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

CSS command to change the IMAGE of an INPUT tag

Hi All

Just to confirm, is it true that you can't change the image of an <INPUT
TYPE="IMAGE".... from within a CSS styelsheet?

I know the standard command is SRC="....", but there doesn't seem to be a
command in CSS that manipulates this value.

Any get arounds?

Thanks

Laphan
May 7 '06 #1
5 2079
Laphan wrote:
Hi All

Just to confirm, is it true that you can't change the image of an <INPUT
TYPE="IMAGE".... from within a CSS styelsheet?

I know the standard command is SRC="....", but there doesn't seem to be a
command in CSS that manipulates this value.

Any get arounds?


Why is it necessary to find a CSS way of finding the image?

To answer your question: no. There's no way of selecting an image in
that way in CSS. The closest you can do is to select the background
image but that doesn't apply here.

Since the image on a button is structural rather than design it's
perfectly acceptable to use HTML here.

--
ironcorona
May 7 '06 #2
On Sun, 7 May 2006 19:10:25 +0100
"Laphan" <in**@SpamMeNot.co.uk> opined:
Hi All

Just to confirm, is it true that you can't change the image of an
<INPUT TYPE="IMAGE".... from within a CSS styelsheet?

I know the standard command is SRC="....", but there doesn't seem
to be a command in CSS that manipulates this value.

No but what are you trying to accomplish?

--
Displayed Email Address is a SPAM TRAP
Our DNSRBL - Eliminate Spam: http://www.TQMcube.com
Multi-RBL Check: http://www.TQMcube.com/rblcheck.php
The Dirty Dozen Spammiest Ranges: http://tqmcube.com/dirty12.php
May 7 '06 #3

I allow the user of my web site/application to change the style of the web
site via an external stylesheet.

The extended work in making every button a graphic was becoming too much,
they create skins so for each skin they were having to create 20 or so
buttons, so I changed the buttons to standard HTML Inputs, which obviously
allowed them to change the border and bg colours of these buttons en masse,
but now a number of my users would like the option to use graphic or html
buttons.

To keep a tight rein on this I was looking to use HTML input buttons still,
but they could specify a SRC for the Input in the stylesheet if they wanted
a graphical button.

It would just make a perfect solution, but it looks like it can't happen.

Thanks anyway.

Rgds Laphan

"David Cary Hart" <De******@TQMcube.com> wrote in message
news:as************@news.TQMcube.com...
On Sun, 7 May 2006 19:10:25 +0100
"Laphan" <in**@SpamMeNot.co.uk> opined:
Hi All

Just to confirm, is it true that you can't change the image of an
<INPUT TYPE="IMAGE".... from within a CSS styelsheet?

I know the standard command is SRC="....", but there doesn't seem
to be a command in CSS that manipulates this value.

No but what are you trying to accomplish?

--
Displayed Email Address is a SPAM TRAP
Our DNSRBL - Eliminate Spam: http://www.TQMcube.com
Multi-RBL Check: http://www.TQMcube.com/rblcheck.php
The Dirty Dozen Spammiest Ranges: http://tqmcube.com/dirty12.php
May 7 '06 #4
In comp.infosystems.www.authoring.stylesheets ironcorona <ir*********@gmail.com> wrote:

| Why is it necessary to find a CSS way of finding the image?

Maybe the choice of which image is just a matter of style.

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
May 7 '06 #5
In comp.infosystems.www.authoring.stylesheets Laphan <in**@spammenot.co.uk> wrote:

| I allow the user of my web site/application to change the style of the web
| site via an external stylesheet.
|
| The extended work in making every button a graphic was becoming too much,
| they create skins so for each skin they were having to create 20 or so
| buttons, so I changed the buttons to standard HTML Inputs, which obviously
| allowed them to change the border and bg colours of these buttons en masse,
| but now a number of my users would like the option to use graphic or html
| buttons.
|
| To keep a tight rein on this I was looking to use HTML input buttons still,
| but they could specify a SRC for the Input in the stylesheet if they wanted
| a graphical button.
|
| It would just make a perfect solution, but it looks like it can't happen.

Would be nice if CSS had a generic way to override any attribute on a
selected element in HTML.

Maybe something like:

img#menu_top_left {
attribute["src"]: url(whatever);
}

But in reality, you'll probably have to dynamically output one of two
different classes of page for the variations on how to decorate them.

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
May 7 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Matt Herson | last post by:
I have been trying to find a way to use JavaScript to change the value of a hidden field on submit. I am already invoking a JavaScript to handle the validation on submit. The reason I need to...
8
by: Siemel Naran | last post by:
Hi. I'm writing a command shell that reads commands from standard input. At this point I have the command in a std::string. Now I want to execute this command in the shell. From the Borland...
0
by: Ed | last post by:
All of a sudden my previously working code started throwing this error. from the SqlDatasource. I am using C# and Asp.net 2.0. Getting the following error: You have specified that your delete...
4
by: John Smith | last post by:
I have a continuous form. there is a command button with the following code for the OnClick event: DoCmd.OpenForm "frmPlants", , , "PlantsID =" & Me!PlantsID I click the button and frmPlants...
1
by: Phil_Cam | last post by:
Hello All On a webpage I have a standard paypal image button for purchases. I am trying to set it up so that it only shows up or is endabled when text is entered into a textbox and a button is...
3
by: printline | last post by:
Hi' I have a little problem with the onclick event. I have an image that i use as a button. When i click this image/button some text appears and a new image/button also appears. when i then click...
3
butro
by: butro | last post by:
Can be changed a picture when an text input onchanged ? For Example : <form id="form1" method="post"> <img src="first_pic_when_page_loaded.gif" id="pic_name" name="pic_name"> <br> <br> Type...
5
by: thatcollegeguy | last post by:
Below are my 3php and 2js files. I create a table using ajax/php and then want to change the values in the tables add(+ number for teamid) id's for each specific td in the table. I don't know...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.