Hoppa till huvudinnehållet

anchor tag styling being ignore

Kommentarer

4 kommentarer

  • Permanently deleted user
    To override this behavior, place a <span> tag around the text in the <a> tag and style that.  For example:

     

    <a style="color:green;" href="http://www.google.com">Print this report</a> would be

     

    <a href="http://www.google.com"><span style="color:green;">Print this report</span></a> or

     

    (untested) better yet

     

    <a href="http://www.google.com"><span class="linkBtn"> Print this report</span></a> which should allow you to add all your customization to that class in your Desktop.css

     

     
    0
  • John Nerge
    Perfect, thank you, Marshall!

     

    Here's the button:

     

    _img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90760000000PDJs&feoid=Body&refid=0EM60000000HT11"_/_img_

     

    Here's my html:

     

    <a href="command:RunWorkflowWithArguments?workflowId=Print_Report&pid={PID}&address={CONCAT_ADD}"><span class="print-button">Print this report</span></a>

     

    And here's my CSS:

     

    .print-button{

     

        background-color:#69BE28;

     

        border-radius: 4px;

     

        color:white;

     

        padding: 4px;

     

        

     

    }

     

    .print-button:hover, .print-button:active  {

     

        background-color:#49861C;

     

        text-decoration: none;

     

    }

     

    a:hover {text-decoration:none;}
    0
  • Permanently deleted user
    Great idea John,  I think I'm going to use this going forward.  The only change I made is that rather than remove text decoration from all 'a' tags, I set it so just the 'a' tags in the feature description would be affected: .feature-description a{ text-decoration:none; }

     

     
    0
  • John Nerge
    Good idea, I made that change to my CSS too, thanks.

     

    One warning I came across while researching how to do this:

     

    https://css-tricks.com/use-button-element/#article-header-id-6

     

    Enter and the space key both work for activating buttons in the GVH, but like the article says only the enter key activates a link.
    0

Du måste logga in om du vill lämna en kommentar.