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

  • SEARCH
  • Home
  • 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 8165375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:31:19+00:00 2026-06-06T19:31:19+00:00

Is it possible—without adding an extra wrapper element—to offset the position of text in

  • 0

Is it possible—without adding an extra wrapper element—to offset the position of text in an HTML element without causing the background to also shift?

Motivation:

I have existing HTML markup (phpBB) and I’m styling some links to look like buttons so that they are visibly pushed down when :active (mouse button down). I have half of this working via a background change, but I want to also offset the text down and to the right 1 pixel.

Existing HTML markup (cannot be changed):

<a href="…"><span></span>Hello World</a>

Fiddle showing the effect and existing CSS (which can be changed): http://jsfiddle.net/szxPz/1/

Edit: I can get the text to move to the right with text-indent:1px; margin-right:-1px, but that still leaves the need to move the text down as well.

  • 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-06-06T19:31:21+00:00Added an answer on June 6, 2026 at 7:31 pm

    You should be able to achieve that by increasing the padding-top and decreasing the height by 1.

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

Sidebar

Related Questions

Is it possible in pure css, that is without adding additional html tags, to
Is it possible to query data from a Model without writing sqarql-queries? Adding properties
Possible Duplicate: How do I ensure a text box is alphanumeric but without a
How do I get the ordered numbers bold without adding more tags? Possible in
Is it possible to position: absolute a <div /> over a Flash banner without
Is it possible to work with Json RPC in C#, VS 2005 without adding
Is it possible to send a MIME message as it is, without adding any
Is it possible to draw on a JFrame without adding a JPanel to it?
Is is possible (without external library such as boost) to prompt for input from
Is it possible without using exponentiation to have a set of numbers that when

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.