• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 196
  • Last Modified:

Selective use of background images in PHP forms

Hello:

In my CSS I have set my forms to display a background image. However, it currently will place this image in any form I create. Is there a way to disable the background image in selected forms?

Regards!
0
geist62
Asked:
geist62
1 Solution
 
paulp75Commented:
add class="something" to your form.
then instead of having your background set to form like this
form {
background: url(images/tickicon.jpg) no-repeat left center;
}

have it set to the class "something"

like this

.something {
background: url(images/yourfilehere.jpg) no-repeat left center;
}

this way when you next make a form it will just use the default settings instead of using the background image
0
 
glcumminsCommented:
>> disable the background image

HTML:
<form class="noimage">
...
</form>

CSS:
form.noimage
{
   background: none;
}
0
 
nplibCommented:
Simple way:

<form style="background-image:none">
...
</form>

Complex way.

In your CSS change the part that assigns an image to your from from
form {background-image:url(file:///images/image.jpg)} ///or what ever it is to
form.useimage {background-image:url(file:///images/image.jpg)}
//add the following to CSS
form.noimage {background-image:none}

Then in your web page change the forms that you want an image in to

<form class="useimage">
....
</form>

and the ones that you don't want an image in

<form class="noimage">
....
</form>
0
 
geist62Author Commented:
Hello:

Thanks for the help!  I'll get back soon with the solution that works for me. I am going to try the simple method as I couldn't get the complext verison to work.

Regards!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now