Page 1 of 1
Styling submit button in FE Users (and Pi Search search button)
Posted: Wed Jul 19, 2006 7:25 am
by Darwin Web Design
Howdy
I'm just wondering how I could style up the buttons in those modules (FE Users login and PiSearch search) using CSS. I know how to do this if I create a form myself, I would create a .button class in the css file and assign this class to the actual submit button code in the HTML.
Seeing as these modules generate their code in such a way that makes absolutely zilch sense to me (I'm not a coder) - can anyone tell me how I would assign my button div class to the submit button for any (or both) of these modules - I'd like all my forms to have nice groovy buttons if possible...
Thanks
Eva

Re: Styling submit button in FE Users (and Pi Search search button)
Posted: Wed Jul 19, 2006 11:06 am
by Russ
You can add a .button class to the template for the pisearch from button (admin/content/pisearch - if you have the module verison of pisearch).
I think the main login from is set in the theme, just looking at the html, you maybe just able to style the class "lbsubmit" for that button in your CSS. Depends which loads first, otherwise have a look in the theme CSS.
Of course styling buttons can be a pretty fruitless exercise as most broswers do them in different ways. Results are usually unpredictable.
Hope this helps,
Russ
Re: Styling submit button in FE Users (and Pi Search search button)
Posted: Wed Jul 19, 2006 1:25 pm
by calguy1000
the standard answer for feusers at least would be to wrap the template in a div and then style all of the classes within the div
i.e:
.... the feusers template
Re: Styling submit button in FE Users (and Pi Search search button)
Posted: Thu Jul 20, 2006 4:54 am
by Darwin Web Design
Thanks Calguy but what do you need to call the class for the actual button so it will take on the properties? The form will automatically take on the standard html elements styling such as input, select and textarea - so I can style these up, but the button (if it is to look different to the background colour of the input boxes), I believe needs a specific class wrapped around the actual submit button part of the code as opposed to the entire form. And with the feusers module I can't really see this code. I tried the following :
{$input_submit} ie in the whole template:
{$startform}
{if $error}
{$error}
{/if}
{$prompt_username} {$input_username} {$prompt_password}
{$input_password} {$input_submit}
{$endform}
but this just puts the boring grey button inside the nice coloured box that I styled for the button itself - so it turned out like a double button.
Thanks
Re: Styling submit button in FE Users (and Pi Search search button)
Posted: Thu Jul 20, 2006 7:09 am
by Dr.CSS
i looked thru the FrontEndUsers.module.php which is where the template is usualy generated and all i could find was this...
i don't know, not a coder just a designer, if this will work but hey you never know can't hurt right... btw does the button already have a class when it is rendered in a browser and you rite clik view source.... looking farther thru that file i'm thinking it's somewhere else, oh well... like i said no coder am i...
function myCreateInputSubmit($id, $name, $value='', $image='', $addttext='')
{
global $gCms;
$text = 'config['root_url'].DIRECTORY_SEPARATOR.$image;
$text .= ' src="'.$img.'"';
}
else
{
$text .=
'"submit"'; if you make a copy of this whole file, as a backup, and then change this to 'class="yourclassname" "submit"';
}
if ($addttext != '')
{
$text .= ' '.$addttext;
}
$text .= ' />';
return $text . "\n";
}
Re: Styling submit button in FE Users (and Pi Search search button)
Posted: Thu Jul 20, 2006 10:18 am
by Darwin Web Design
Hay I think you're onto something with that.
I'm going to give it a go and let you know how it goes
Thanks
PS - I thought you were a coder?
Re: Styling submit button in FE Users (and Pi Search search button)
Posted: Thu Jul 20, 2006 3:15 pm
by Dr.CSS
by coder i mean modules and .php stuff like that file...
no i can't scratch something up on my own but i can usually follow the logic some what...
as far as HTML and CSS well that might be another story...... coming to a news stand near you soon

just kidding...