Styling submit button in FE Users (and Pi Search search button)

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am

Styling submit button in FE Users (and Pi Search search button)

Post 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
???
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm

Re: Styling submit button in FE Users (and Pi Search search button)

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Styling submit button in FE Users (and Pi Search search button)

Post 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
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am

Re: Styling submit button in FE Users (and Pi Search search button)

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Styling submit button in FE Users (and Pi Search search button)

Post 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";
}
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am

Re: Styling submit button in FE Users (and Pi Search search button)

Post 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 ;D ;D ;D

PS - I thought you were a coder?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Styling submit button in FE Users (and Pi Search search button)

Post 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  :D just kidding...
Post Reply

Return to “Layout and Design (CSS & HTML)”