Hello.
I am trying to use the regular submit button for my poll using a php script. I want the submit button to match just like the other one I currently have on the page....gray background, highlights with yellow borders when hovering.
In HTML, the code is:
<input type="button" value="Submit">
How can I use the same look of that submit button in this code:
// Use CSS code to style the 'vote' button
$buttonstyle="border:1px solid gray;
background:#CCCCCC;color:black;";
When I tried:
$buttonstyle="input type"button" value "submit"";
I saw a small button (just the one I wanted) but all text was missing so of course it didnt work. I tried adding brackets and commas, couldn't get anything to work.
Can someone please help me here??
Thanks!
How to use CSS code to style vote button in php file?
Moderator: General Moderators
-
chesterskeeper
- Forum Newbie
- Posts: 1
- Joined: Fri Jun 04, 2004 3:51 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
<input type="button" value="Submit" style="<?php echo $buttonstyle; ?>">inside php tags:
Code: Select all
echo '<input type="button" value="Submit" style="'.$buttonstyle.'">';
// or
echo "<input type="button" value="Submit" style="$buttonstyle">";
// there are many more ways.. but you get the picture, I hope.