+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 19 of 19

Thread: Button Class

  1. #11
    Administrator richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere only we know...
    Posts
    3,207
    Blog Entries
    14
    Real Name
    Rich
    Rep Power
    14

    Quote Originally Posted by jmurrayhead View Post
    What if you set a lineheight? (i.e. line-height: 2em; )
    That seems to have sorted it. That was doing my head in!!

    Thanks J...

  2. #12
    Barn Frequenter BLaaaaaaaaaarche will become famous soon enough BLaaaaaaaaaarche will become famous soon enough BLaaaaaaaaaarche's Avatar
    Join Date
    Mar 2008
    Posts
    188
    Rep Power
    5

    richy, I like that button. Can you post an attachment with full images as well as style sheet???
    "You'll never be as perfect as BLaaaaaaaaarche."

  3. #13
    Administrator richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere only we know...
    Posts
    3,207
    Blog Entries
    14
    Real Name
    Rich
    Rep Power
    14

    The various classes are:-
    Code:
    .button_green { display:inline-block; height:20px; line-height:20px; border:solid 1px #325CAB; position:relative; padding:0px 25px 0px 3px; margin:0px 0px 0px 0px; background-color:#FFFFFF; background-image:url('/images/button_border_green1.gif'); background-position:right; background-repeat:no-repeat; font-family: "Arial", "Verdana"; font-size:10pt; color: #000066; text-decoration:none; font-weight:bold; }
    .button_orange_cross { display:inline-block; height:20px; line-height:20px; border:solid 1px #325CAB; position:relative; padding:0px 25px 0px 3px; margin:0px 0px 0px 0px; background-color:#FFFFFF; background-image:url('/images/button_border_orange_cross1.gif'); background-position:right; background-repeat:no-repeat; font-family: "Arial", "Verdana"; font-size:10pt; color: #000066; text-decoration:none; font-weight:bold; }
    .button_orange_arr { display:inline-block; height:20px; line-height:20px; border:solid 1px #325CAB; position:relative; padding:0px 25px 0px 3px; margin:0px 0px 0px 0px; background-color:#FFFFFF; background-image:url('/images/button_border_orange_arrLeft1.gif'); background-position:right; background-repeat:no-repeat; font-family: "Arial", "Verdana"; font-size:10pt; color: #000066; text-decoration:none; font-weight:bold; }
    .button_red_cross { display:inline-block; height:20px; line-height:20px; border:solid 1px #325CAB; position:relative; padding:0px 25px 0px 3px; margin:0px 0px 0px 0px; background-color:#FFFFFF; background-image:url('/images/button_border_red_cross1.gif'); background-position:right; background-repeat:no-repeat; font-family: "Arial", "Verdana"; font-size:10pt; color: #000066; text-decoration:none; font-weight:bold; }
    .drop_shadow {  float:left;
      background: url('/images/drop_shadowAlpha.png') no-repeat bottom right !important;
      background: url('/images/drop_shadow.gif') no-repeat bottom right;
      margin: 10px 0 0 10px !important;
      margin: 10px 0 0 5px;
      }
    .drop_shadow span { display: block;
      position: relative;
      margin: -5px 5px 5px -5px;
      padding:2px 0px 0px 1px;
    }
    
    To use in a page have:-
    Code:
    <span class="drop_shadow" style="float:right">
    <span>
    <a onclick="window.location='#top';set_cookie_jar('textarea');" id="ctl00_main_content_frmAdd" class="button_green" href="javascript:__doPostBack('ctl00$main_content$frmAdd','')">Add</a>
    </span>
    </span>
    
    My example uses an asp.net linkbutton control, but I have posted the rendered HTML so you can see how it works.

    I've also attached a zip containing the images I used.

    If you need anything else, let me know.

    <edit>The style="float:right" was because I wanted the button to align to the right of another element. You could dispense with this or change it accordingly.</edit>
    Attached Files
    Last edited by richyrich; February 27th, 2009 at 03:29 AM.

  4. #14
    Administrator richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere only we know...
    Posts
    3,207
    Blog Entries
    14
    Real Name
    Rich
    Rep Power
    14

    I'm having a problem center aligning this button.

    Code:
    <td style="width:100%;text-align:center;height:40px;vertical-align:middle;" colspan="3">
    <span class="drop_shadow">
    <span>
    <asp:LinkButton ID="lnkLogin" runat="server" ToolTip="Login" Text="Login" CssClass="button_green" OnClick="user_login" />
    </span>
    </span>
    </td> 
    If I add style="float:none" to the drop_shadow span then it centers it but I lose the drop shadow.

    Any ideas?

  5. #15
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    Try setting a padding for the table cell. (i.e. padding: 5px auto
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


  6. #16
    Administrator richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere only we know...
    Posts
    3,207
    Blog Entries
    14
    Real Name
    Rich
    Rep Power
    14

    no..Makes no difference.

    I think the problem is that the drop_shadow class has a float:left element to it.

  7. #17
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    The only other thing that I can think of would be to change the drop_shadow and drop_shadow class margins so that they use auto.
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


  8. #18
    Administrator richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere only we know...
    Posts
    3,207
    Blog Entries
    14
    Real Name
    Rich
    Rep Power
    14

    Hmmm...Still no joy..

  9. #19
    Administrator richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere only we know...
    Posts
    3,207
    Blog Entries
    14
    Real Name
    Rich
    Rep Power
    14

    OK I just added a padding-left:45% to the table cell.

    That seems to have sorted it satisfactorily...

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. class name is ambiguous
    By richyrich in forum .NET Development
    Replies: 11
    Last Post: August 12th, 2008, 12:11 PM
  2. Generic Paging Class
    By Shem in forum .NET Development
    Replies: 4
    Last Post: July 18th, 2008, 12:29 PM
  3. FTP Class Library?
    By Wolffy in forum .NET Development
    Replies: 6
    Last Post: May 30th, 2008, 11:26 AM
  4. Class library
    By Shem in forum .NET Development
    Replies: 11
    Last Post: May 22nd, 2008, 08:01 AM
  5. delete button
    By techker in forum Microsoft Access
    Replies: 14
    Last Post: May 21st, 2008, 09:56 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

SEO by vBSEO