WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Skip content link and vertical scroll bar (5 posts)

  1. Distiple
    Member
    Posted 1 year ago #

    im using a twenty ten child theme on my site, http://wordsandmusic.me.
    For some reason, there is a large amount of empty space to the left (using a right to left language), with the skip to content link appearing after scrolling all the way to the left (im assuming that link is the reason for this empty space).

    Is there any way to remove this space (i have no problem with removing the link as well)?

    Thanks.

  2. Hi Distiple,

    Skip to content links are there for users viewing the web via screen-readers. It is not recommended to delete or hide these links using CSS as this prevents some screen-readers from picking them up. They should instead be positioned off the page using CSS, so they are not visible but still accessible for screen-readers.

    The skip to content links are positioned to the far left of your page. Normally this wouldn't prove a problem, but your site's direction is set from right to left. Therefore, the skip to content links need to be positioned to the far right of your page.

    To do this, firstly find the following code in your (child theme) style.css file:

    .screen-reader-text {
    position: absolute;
    left: -9000px;
    }

    Change the "left" to "right" so that you're left with:

    .screen-reader-text {
    position: absolute;
    right: -9000px;
    }

    This should solve your issue. Let me know if it helps!

  3. Distiple
    Member
    Posted 1 year ago #

    Wonderful, thank you so much.

    I didnt have this code in my child theme, so i had to edit in the parents css. What code can i add to the child that will override this?

    Thanks again!

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    .screen-reader-text {
     left: initial;
     right: -9000px;
    }
  5. Distiple
    Member
    Posted 1 year ago #

    Perfect. Thank you both.

Topic Closed

This topic has been closed to new replies.

About this Topic