Skip to:
Content
Pages
Categories
Search
Top
Bottom

button CSS ?


  • abcde666
    Participant

    @erich73

    I would like to make my button using 2 images (image left and image-right), so that the image will take up the proper size based on the text within the button.

    I have found some CSS-code on the internet, but not sure how change the default-CSS to apply this:

    http://www.kollermedia.at/wp-content/themes/kollermedia/specials/perfect_button/button.html

    HTML-Code:


    <div class=”button”><input id=”login” type=”submit” value=”login” title=”login”/></div>


    CSS-code:


    1.

    <style type=”text/css”>

    2.

    div.button {height:23px; background:url(bg_button_right.gif) right no-repeat; width:auto; float:left;}

    3.

    div.button input {height:23px; background:url(bg_button_left.gif) left no-repeat; color:#ffffff; font-weight:bold; border:none; overflow:visible; display:inline; margin:0px; padding:0px 4px 2px 4px; font-size:11px; font-family:Verdana, Arial, Helvetica, sans-serif};

    4.

    </style>


    Anyone a quick idea of how to prepare the default button-CSS in order to make this happen ?

    Appreciate your help !

Viewing 6 replies - 1 through 6 (of 6 total)

  • modemlooper
    Moderator

    @modemlooper

    You need to add another div inside then position two images as backgrounds. One image should be wider than the text. The other image should be shorter. You would position one image to left and the other to right. Google css sliding doors There are a ton of tuts online.


    abcde666
    Participant

    @erich73

    do you have an idea how the div needs to look like and how to put 2 images into the CSS of the dafault CSS-code ?

    Many thanks,


    abcde666
    Participant

    @erich73

    looks like this is not possible just by changing the CSS-code ?

    the <span> tag is missing within HTML…..

    <span>Submit</span>

    How is BuddyPress defining the width of a button ?


    abcde666
    Participant

    @erich73

    hmmm…. I am thinking of dis-abling the buttom-CSS-styles totally.

    So that the buttons look like a very simple button like the Submit-button at Google.com

    I have tried to disable all default button-CSS, but still not getting the same simple button as at Google.

    Do you know which CSS-items I need to disable in order to make just a simple button ?

    Many thanks,


    ruthlessbookie
    Member

    @ruthlessbookie

    in CSS, look for

    button-nav

    and

    generic-button

    those are the basic styles for the buttons.

    as previously mentioned, your original idea employs the use of something called “sliding doors”. if you’ve never done it before, you might want to start here:

    http://www.alistapart.com/articles/slidingdoors/


    abcde666
    Participant

    @erich73

    thanks ruthless,

    I do know where to find the CSS-code, but I have changed the code to “none” for each element.

    I still do not get the result of having just a simple button like it is for example here at buddypress.org or at Google.com

    I just want to get rid of all the default button-CSS, just having a simple button without CSS.

    default:


    a.button, input[type=submit], input[type=button],

    ul.button-nav li a, div.generic-button a {

    background: url( ../images/white-grad.png ) top left repeat-x;

    border: 1px solid #ddd;

    padding: 3px 10px;

    -moz-border-radius: 3px;

    -webkit-border-radius: 3px;

    border-radius: 3px;

    text-decoration: none;

    color: #888;

    font-size: 12px;

    font-weight: normal;

    vertical-align: bottom;

    cursor: pointer;

    }


    changed all elements to NONE:


    a.button, input[type=submit], input[type=button],

    ul.button-nav li a, div.generic-button a {

    background: none;

    border: none;

    padding: 3px 10px;

    -moz-border-radius: none;

    -webkit-border-radius: none;

    border-radius: none;

    text-decoration: none;

    color: #888;

    font-size: 12px;

    font-weight: normal;

    vertical-align: bottom;

    cursor: pointer;

    }


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘button CSS ?’ is closed to new replies.
Skip to toolbar