+ Start a Discussion
Charlie CoxCharlie Cox 

Making a CommandButton look like a CommandLink

For reasons that don't matter I am trying to make a button look like a link using css in visualforce. Currently I have:
<button class="tableButton">
               <apex:commandButton value="{!c.Name}" action="{!viewCrs}">
                          <apex:param value="{!c.Id}" assignTo="{!courseId}" name="courseId" />

The tableButton css looks like:
.tableButton {
     /*border is optional*/
     border-bottom:1px solid #444;
     cursor: pointer;

However this just underlines the existing button. I'd like the "button" to look something like: click here to go to desired page

By doing the following, I get something close to what you want.  This should get you close enough to finish.  The big take aways are the styleClass and the !important

.myButton {
background: none !important;
text-decoration: underline !important;
border: none !important;
color: blue !important;
cursor: pointer !important;
<apex:commandButton value="Foo" styleClass="myButton"></apex:commandButton>