+ Reply to Thread
Results 1 to 6 of 6

Thread: CSS trick for seperate styling of inputs

  1. #1
    Full Member dzone is on a distinguished road
    Join Date
    Dec 2003
    Posts
    75

    Thumbs up CSS trick for seperate styling of inputs

    Hello,

    I have found out that you can style buttons and checkboxes separately via CSS!

    Code:
    input, select, textarea {
        background-color: #7FA7BB;
        color: #1A1B1B;
    }
    input[type="submit"], input[type="reset"], input[type="checkbox"] {
        background-color: #8FBDD3;	
    }
    That will make the background of buttons and checkboxes different from the textarea's background.

    Hope that helps,
    Z.
    ------------------------------------
    [URL=http://www.dedicatedzone.com]Managed Dedicated Servers[\URL]

  2. #2
    Full Member dzone is on a distinguished road
    Join Date
    Dec 2003
    Posts
    75
    I didn't say that is a secret, but that's rarely used and I hoped that this would be useful for other forum visitors
    ------------------------------------
    [URL=http://www.dedicatedzone.com]Managed Dedicated Servers[\URL]

  3. #3
    Web Junky Matt is on a distinguished road
    Join Date
    Dec 2003
    Posts
    71
    Thank you for sharing
    WebmasterLingo.com Team
    Forum Rules

    "Anyone who has never made a mistake has never tried anything new" - Albert Einstein

  4. #4
    Moderator airnine is on a distinguished road
    Join Date
    Jan 2004
    Posts
    78

    Thumbs up that's great

    great!

    so far I have been using only different styles directly inside html tags or through different css classes

    ZYV's tips might come really handy some day

    thanks on my part

    Airnine

    P.S.: I didn't know you could differ input types like

    input[type="submit"], input[type="reset"], input[type="checkbox"]

    it's nice though
    -------------------------------
    Airnine is a developer @
    www.promomedium.com
    -------------------------------

  5. #5
    I learn the css tricks when i had to modify a phpbb forum (vBulletin ..no offense). The style from phpbb is the best way to learn how css works. I love the explanation from the bottom like "
    /* The register, login, search etc links at the top of the page */
    .mainmenu { font-size : 11px; color : #000000 } "

    Study old masterpiece and you will discover your own talent and skills.

  6. #6
    Full Member AdulteratedJedi is on a distinguished road
    Join Date
    Jan 2004
    Posts
    9

    Re: that's great

    Originally posted by airnine
    P.S.: I didn't know you could differ input types like

    input[type="submit"], input[type="reset"], input[type="checkbox"]
    Yup there called Attribute Selectors

    AJ

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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