This is a migrated thread and some comments may be shown as answers.

[Solved] Harmonize Button Style

1 Answer 191 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Frank Michael
Top achievements
Rank 1
Frank Michael asked on 10 May 2010, 04:48 PM
I want to harmonize the Button Style in my app with the Telerik Styles.
I have this code:
<% using (Html.BeginForm("QuickSearchResult", "Search")) %> 
            <% { %> 
                <!-- Form content goes here --> 
                <%= Html.TextBox("q", "", new { @class = "input-box" })%> 
                <input type="submit" value="Search" class="t-button" /> 
            <% } %> 
            <%= Html.ActionLink("Advanced Search", "Search", "Search", new { @class = "t-button"})%> 

The Search Button has a light border while the Advanced Search Button has a dark border.
The rendered css for the Search Button is:
.t-button  { 
background:url("Hay/sprite.png"repeat-x scroll 0 -96px #E8E8E8
color:#333333

.t-button { 
-moz-border-radius:3px 3px 3px 3px
border-style:solid
border-width:1px
cursor:pointer
display:block
line-height:18px
outline:medium none
padding:2px 4px
text-align:center
text-decoration:none
The rendered css for the Advanced Search Button is:
.t-button  { 
background:url("Hay/sprite.png"repeat-x scroll 0 -96px #E8E8E8
color:#333333
.t-button { 
-moz-border-radius:3px 3px 3px 3px
border-style:solid
border-width:1px
cursor:pointer
display:block
line-height:18px
outline:medium none
padding:2px 4px
text-align:center
text-decoration:none
How can I harmonize the buttons?
This is in firefox.
In ie both buttons are the same.
Probably in firefox the default submit is colored differently?

1 Answer, 1 is accepted

Sort by
0
Frank Michael
Top achievements
Rank 1
answered on 10 May 2010, 05:21 PM
I managed to make the look of the button the same.
<% if (ViewContext.HttpContext.User.Identity.IsAuthenticated) 
   { %> 
            <% using (Html.BeginForm("QuickSearchResult", "Search")) %> 
            <% { %> 
                <%= Html.TextBox("q", String.Empty)%> 
                <button type="submit" class="t-button t-state-default">Search</button> 
            <% } %> 
            <%= Html.ActionLink("Advanced Search", "Search", "Search", new { @class = "t-button t-state-default" })%> 
 
<%} %> 

However in the sample if you hover over the button, it changes the state. How can I make this work with my buttons as well?
Tags
General Discussions
Asked by
Frank Michael
Top achievements
Rank 1
Answers by
Frank Michael
Top achievements
Rank 1
Share this question
or