Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6827047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:13:12+00:00 2026-05-26T22:13:12+00:00

On a page (which I maintain for myself and thus can restrict browser support

  • 0

On a page (which I maintain for myself and thus can restrict browser support to FF 3.5+) I’d like to add “SO” after each link to StackOverflow.com. First I did it like this…

a[href^='https://stackoverflow.com/']:after {
  content: "SO";
  font-size: x-small;
  color: #333333;
  padding-left: 1px;
  position: relative;
  bottom: 3px;
}

…but Firefox underlined “SO” like the link itself. After reading questions

  • “text-decoration” and the “:after” pseudo-element, revisited
  • “text-decoration” and the “:after” pseudo-element

…I got to the following solution:

a[href^='https://stackoverflow.com/']:after {
  content: "SO";
  font-size: x-small;
  color: #333333;
  padding-left: 1px;
  position: relative;
  bottom: 3px;
  /* clear the underline */
  padding-bottom: 5px;
  background-color: white;
}

Maybe it’s hack’ish, but it’s rather intuitive (the underline is hidden by the background above it) and it worked nice (I don’t remember I checked it in browsers other than FF 3.5 and FF 7, but still FF is the only browser I really want to support). The problem is that the code broke in FF 8: the underline-clearing code above does not work. So I’m looking for a solution.

Actually, I already find one: adding “display: inline-block”, but:

  • it can cause “SO” to be wrapped to a new line
  • it can’t be used together with the old underline-clearing code, because that padding-bottom is added to the link itself

http://cssdesk.com/5TqEN

Final note: I want it to work at least in FF 3.5 and FF 8, with only CSS, without making “SO” text an image, better than the inline-block solution

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:13:12+00:00Added an answer on May 26, 2026 at 10:13 pm

    I came with up with this http://jsfiddle.net/wGb68/4/

    a[href^='http://stackoverflow.com/'] {
        padding-right: 15px;
        display: inline-block; /* not needed, but fixes Chrome and Opera */
    }
    
    a[href^='http://stackoverflow.com/']:after {
        font-size: x-small;
        padding-left: 1px;
        content: "SO";
        color: #333;
    
        position: absolute;
    }
    

    Poorly the clearing of the text-decoration only works in Firefox and Opera with this code. I could not bring it to work in any other browser. :/

    The display: inline-block is not needed in Firefox, but without it in Opera and Chrome the “SO” don’t follows a linebreak, and even overlaps the container.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page in which I want to maintain the value of object
I have a page which spawns a popup browser window. I have a JavaScript
I have displayed the login link on the home page. Which links to the
Ok, I've got this singleton-like web class which uses session to maintain state. I
I recorded a web page using JMeter which has produced several samplers. Each of
I have a page which does quite a bit of work and I don't
If I hit a page which calls session_start() , how long would I have
I have a page which is largely created by DOM script, which generates a
I have a web page which contains a select box. When I open a
I have small page which has label, DropDownList and a submit button. <div> <asp:label

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.