473,804 Members | 4,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2092
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******@TQMcu be.com> wrote in message
news:as******** ****@news.TQMcu be.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.infosystem s.www.authoring.stylesheets ironcorona <ir*********@gm ail.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.infosystem s.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_le ft {
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
17309
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 change this field is some of the forms have two buttons on them, each needs to process the form differently. If I can change the value of the hidden field dynamically it will solve my issue as I can run each against a diffent cgi. Currently my...
8
1333
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 newsgroups I learned that there is a function in stdlib.h called system. int system(const char *command); First question, is the system command ANSI compliant. Because I include <cstdlib> and write std::system(command.c_str()); it looks like an...
0
3340
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 command compares all values on SqlDataSource 'sdsAddEdit', but the dictionary passed in for values is empty. Pass in a valid dictionary for delete or change your mode to OverwriteChanges.
4
4806
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 opens up with the record that corresponds to the one on the cont. form. I put that same code for the OnClick of an image control (i.e. the user clicks a little icon to open the form instead of a button) and frmPlants
1
6151
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 pressed. To do this I set the type to hidden and changed the type of the button using javascipt to image. This works perfectly in Modilla's Firefox but in IE it says there is a scipt error. Here is the javascipt
3
2603
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 the new image/button the text should disapper again. I have gotten so far as to getting the text to appear, but can't quite figure out how to make it disappear again, with the new button. Please help, thank You. Here is my code:
3
3529
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 Correct Image Name And Change Pic : <input type="text" name="image_name">
5
4469
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 if I have the entirely wrong approach, but my code is below. Any or all help is appreciated! What currently happens is that the getdivision.php script works perfectly and gives me an entire table of correct data. The problem is that when I click...
0
9589
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10593
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9163
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6858
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3830
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3000
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.