Modifying CSS of the Search module's input box. SOLVED

General questions relating to Joomla! There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
lordyshadow
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Jul 23, 2007 6:13 pm

Modifying CSS of the Search module's input box. SOLVED

Post by lordyshadow » Mon Jul 23, 2007 6:23 pm

Basically, want I want to do is edit the CSS of the search input box to give it a background and a different size. The only way that I've been able to find to do this is to assign these properties to ".inputbox" in my css file. The problem is, this effects ALL of the input boxes AND dropdown menus on the site. I want to be able to edit only the search input box.

How would I do this?

I am using the default search module that came with Joomla, by the way. I've rummaged around in the .php file for the module a bit hoping that I'd see how to do it, but I haven't found an answer.
Last edited by lordyshadow on Mon Jul 23, 2007 6:57 pm, edited 1 time in total.

User avatar
jalil
Joomla! Guru
Joomla! Guru
Posts: 925
Joined: Wed Jul 04, 2007 4:54 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Modifying CSS of the Search module's input box.

Post by jalil » Mon Jul 23, 2007 6:38 pm

lordyshadow wrote: Basically, want I want to do is edit the CSS of the search input box to give it a background and a different size.

The only way that I've been able to find to do this is to assign these properties to ".inputbox" in my css file. The problem is, this effects ALL of the input boxes AND dropdown menus on the site. I want to be able to edit only the search input box.

How would I do this?
The Search is a module, so you can use module class suffix. If you add this text...  "_search" ( without the quotes ) in your search module where it says "module class suffix", the the class generated for this particular module is
[ .moduletable_search ] and within this class you can do anything, and it won't have any effect on the other modules.

hope this helps.

lordyshadow
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Jul 23, 2007 6:13 pm

Re: Modifying CSS of the Search module's input box.

Post by lordyshadow » Mon Jul 23, 2007 6:51 pm

Ah, perfect! So elegant, so simple. No wonder I missed it. Thanks a lot, that solves that problem. And that'll be very nice to know further down the road, I'm sure.

User avatar
jalil
Joomla! Guru
Joomla! Guru
Posts: 925
Joined: Wed Jul 04, 2007 4:54 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Modifying CSS of the Search module's input box.

Post by jalil » Mon Jul 23, 2007 6:58 pm

lordyshadow wrote: Ah, perfect! So elegant, so simple. No wonder I missed it. Thanks a lot, that solves that problem. And that'll be very nice to know further down the road, I'm sure.
aye.....it's very useful.

AHTaylor1
Joomla! Intern
Joomla! Intern
Posts: 62
Joined: Sun May 15, 2011 10:40 pm

Re: Modifying CSS of the Search module's input box. SOLVED

Post by AHTaylor1 » Mon Sep 08, 2014 1:19 pm

I have this exact problem! Done as suggested but still not working.

ive added .moduletable_search to bottom of my css file but when I use"background" to set the colour it edits the whole of the search box not just the input box. Basically I want the background Grey but the inside of the input box white - Any ideas?


Locked

Return to “General Questions - 1.0.x”