Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009
    Posts
    26
    Plugin Contributions
    0

    css problem How can I make an input box have a color rather then being plain?

    My site is not yet online, developing it locally...
    I would like to customise the search on the left side, like in : http://osc.template-help.com/zencart_24185/index.php

    I see they use a seperate stylesheet (stylesheet_boxes.css)

    Where would I assign that class to the search box?

    Thank you

    and would css buttons need to be on or off in my layout settings?

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: How can I make an input box have a color rather then being plain?

    It can be styled in the same way as any other element.

    It will be an <input> tag. To specify just that <input> tag you need its ID or a class, or the ID of a containing element.

    Start with:

    Code:
    #searchContent input{background-color:red;}
    You'll discover that this alters the input box and the button ( they are both <input>) To separate them out you are going to need to either 1. play around with the first-child selector in the css but this is buggy across browsers in my opinion. 2. Edit the code to add a ID or a class to one or both elements.

    Or you could try this:
    Code:
    #searchContent input[type=text]{background-color:red;}
    But I think this is buggy across browsers too so I would really recommend adding IDs or classes to the elements.

  3. #3
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: How can I make an input box have a color rather then being plain?

    I have been to the dentist so am feeling a bit slow!

    With css buttons enabled you may have more lock at separating the elements.


    CSS buttons adds a class to the buttons so you can use that to discriminate between the button and the text input.

    Code:
    #searchContent input{background-color:red;}
    .button_search{background-color:green !important;}

  4. #4
    Join Date
    Jul 2009
    Posts
    26
    Plugin Contributions
    0

    Default Re: How can I make an input box have a color rather then being plain?

    Thank you so much!!

 

 

Similar Threads

  1. v139h How do I make a Text Attribute input box smaller?
    By dandandanpie in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 7 Mar 2012, 08:22 PM
  2. How to change text color of input box?
    By mumzie in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Nov 2007, 06:28 PM
  3. How to have sub categories set; also, how to change color in contents of side box?
    By Kitty in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 Nov 2006, 07:15 AM
  4. Replies: 2
    Last Post: 1 Nov 2006, 02:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg