Wish to style specificaly the Search box? help

Wish to style specificaly the Search box? help

RavenRaven Posts: 28Questions: 0Answers: 0
edited January 2012 in General
Hi i just started learning jquery and love this Datatables.
i need to style the input box itself use to filter the table with this:
[code]
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
height: 16px;
width: 400px;
color: Gray;
border: #1a1966 solid 1px;
border-style: groove;
margin: 2px;
text-align: left;
[/code]

so i went to demo_table.css and went to the section for .dataTables_Filter{}
but when i add my style here, it doesnt affect the box, it moves and places a border around the label and box.

thanks for advance

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    edited January 2012
    What was the selector you used? Was it just div.dataTables_filter input { .... }?

    Allan
  • RavenRaven Posts: 28Questions: 0Answers: 0
    On my master page goes like this: ofc it has more to it, run at server etc just keeping this code simple, cause its a master page e.g just leaving out the extra's.
    [code]















    [/code]

    Now on my page uses that ContentPlaceHolder1

    [code]

    Search Results






    DR No

    etc...
    [/code]

    is this what you needed. Thanks allan if i can get fully understand everything, ill glady donate end of month.
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    [code]
    #tblSearchCust_filter {
    background-color: red;
    }
    [/code]

    Allan
  • RavenRaven Posts: 28Questions: 0Answers: 0
    LOL wanna upload you a screen shot of this :D The search box next to Search: i wanted to apply the following
    [code]
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    height: 16px;
    width: 400px;
    color: Gray;
    border: #1a1966 solid 1px;
    border-style: groove;
    margin: 2px;
    text-align: left;
    [/code]

    but applying any style to _filter like e.g background red, makes the column of that row with the searchbox in it, red.

    sorry for making things difficult
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    [code]
    #tblSearchCust_filter input {
      background-color: red;
    }
    [/code]

    If you want to style the input element, just modify the CSs selector, like I have above.

    Allan
This discussion has been closed.