• Resolved David Venter

    (@davidventernet)


    Hi guys. I’m in the process of developing my first WordPress theme from scratch. But I have run into a very strange issue that I just can’t seem to troubleshoot myself. Perhaps one of you more advanced pro’s out there can help me with this one…

    I’ve set the following as my link styling in my css file:

    a:link {color:#191919; text-decoration: none;}
    a:visited {color:#191919; text-decoration: none;}
    a:hover {color:#009fc7; text-decoration: none;}
    a:active {color:#009fc7; text-decoration: none;}

    I’ve made a header that is fixed to top of the screen and remains there while scrolling. It contains my logo, site name, top navigation and social media links. I’ve set this up using divs and assigned classes to each div for css styling. I’m trying to change the link styling of one of these div classes to be different than the main site link styling.

    I’ve set the following as my div class link styling in my css file:

    .site-title-container a:link, a:visited {
    color: #ffffff;
    text-decoration: none;
    }

    .site-title-container a:hover {
    color: #f2f2f2;
    text-decoration: none;
    }

    This successfully changed the link styling on the div with the site-title-container class, however, it also changed the link styling on other divs in my top bar, divs which has different classes. What’s even more strange is that it even changed only half the content/links in one of the other divs while leaving the remaining half as set by the main link styling. It also changed my main post content link styling even though the blog content has an entirely different div class.

    Either I’m missing something or I’ve been setting up my divs incorrectly. Could someone please be so kind as to look over my code and let me know how I can fix this mess?

    I’m developing the theme live on: dev.davidventer.net/wordpress – Take a look and you’ll notice the top bar link style issue. Only the site title and logo is supposed to be white, the rest of the content in that bar should be black, for now, according to my CSS styling. Please help!?

Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Strange link styling issues. Please Help!’ is closed to new replies.