WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Strange link styling issues. Please Help! (14 posts)

  1. David Venter
    Member
    Posted 11 months ago #

    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!?

  2. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    None of your CSS is showing on your site - but this error message is:

    Notice: Undefined variable: bool in /nfs/c05/h05/mnt/159468/domains/dev.davidventer.net/html/wordpress/wp-content/themes/DV2014/functions.php on line 56

  3. David Venter
    Member
    Posted 11 months ago #

    Sorry, please view http://dev.davidventer.net/wordpress/index.php

    The functions error should be fixed now. - Still having the strange link styling issues.

  4. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    Yes, the error is gone, but your site has virtually no visible/working CSS! You need to enqueue the stylesheet - doesn't look like that's what you've done?

    http://codex.wordpress.org/Function_Reference/wp_enqueue_style

    You're also missing a DOCTYPE in the header...see:

    http://codex.wordpress.org/Theme_Development#Document_Head_.28header.php.29

  5. David Venter
    Member
    Posted 11 months ago #

    That is strange. I'm seeing the site just fine on my end, apart from the link styling issues. I'll look into it though and report back here.

  6. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    Okay, just checked again and it's working...I'll look at your question.

  7. David Venter
    Member
    Posted 11 months ago #

    Ok, thank you for your patience and assistance. Hope I can get this resolved!

  8. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    I actually don't see (or maybe I don't understand) the problem - all the regular menu links look the same to me. Have you cleared your browser cache?

  9. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

  10. David Venter
    Member
    Posted 11 months ago #

    Only the DV logo and DAVIDVENTER.NET is supposed to be light, according to my CSS, everything else on the blue top bar should be dark/black. Also the "share" links at the bottom of the posts should be dark, not white. Not sure how or why the link CSS from the .site-title-container div class rolled over into other random parts of the site.

    I'm checking on the validator errors now. Thanks for sharing that.

  11. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    everything else on the blue top bar should be dark/black.

    That's what I see on Firefox, Chrome and Safari :)! Are you sure you're not having caching issues?

  12. David Venter
    Member
    Posted 11 months ago #

    Ok, now I feel really really dumb LOL. I was using safari, mostly. I've cleared cache a few times and still experienced the issue, thus I've ruled out cache as being the issue. Though I haven't checked the site in any of my other browsers. Now that you've mentioned that what you see is how it's supposed to be, i checked on chrome and firefox and it was fine. I've cleared Safari's cache again and it's still looks "wrong" in Safari. Maybe there is something wrong with my Safari browser. I'll look into it.

    Sorry for wasting your time and thank you for your assistance!

  13. David Venter
    Member
    Posted 11 months ago #

    Even after a Safari 'Develop > Empty Cache' and a 'Reset Safari' I still see it like this: http://d.pr/i/9Iie

  14. David Venter
    Member
    Posted 11 months ago #

    Closing this topic as resolved since the issue is caused by a browser error not related to WordPress. Thanks for the assistance WPyogi :-)

Reply

You must log in to post.

About this Topic