Grow your CSS skills. Land your dream job.

CSS or HTML?

  • # December 20, 2011 at 4:45 pm

    I’m having a difficult time trying to determine whether something is controlled by CSS or HTML. I’ve been using Firebug and I’m 95% sure that what I’m looking at is an inline HTML style.

    My navigation bar, located here:
    http://www.nintendonerds.com/forums/

    …has a button at the end (magnifying glass) that shows/ hides a search bar. I personally dislike that and I want it to always show. By default, it’s hidden unless that magnifying glass button is clicked on.

    I tried changing “display:none” to “display: inline-block” for the #search ID but something is controlling that to where it’s still hidden by default.

    Am I overlooking something simple here, or does this go beyond CSS or HTML?

    Any help is greatly appreciated.

    Thanks,
    Kevin

    # December 20, 2011 at 4:55 pm

    In your MAIN.JS file, comment this section out:


    // Show & Hide: Search
    $("#search").hide();
    $('.jq_show_search').click(function() {
    $('#search').fadeOut('fast');
    });
    $('.jq_show_search').click(function(event){
    if(!$('#search').is(":visible")) {
    $('#search').stop().fadeIn('fast');
    $('#search').css('visibility','visible');
    }
    return false;
    event.stopPropagation();
    });

    Or, if you want keep the functionality of making the form show and hide but just want to make it show by default, just comment out this first line (it’s what causing it to be invisible on page load):

    $("#search").hide();
    # December 20, 2011 at 4:55 pm

    The show/hide is being controlled by javascript.

    Line 37 from main.js:

        // Show & Hide: Search
    $("#search").hide();
    $('.jq_show_search').click(function() {
    $('#search').fadeOut('fast');
    });
    $('.jq_show_search').click(function(event){
    if(!$('#search').is(":visible")) {
    $('#search').stop().fadeIn('fast');
    $('#search').css('visibility','visible');
    }
    return false;
    event.stopPropagation();
    });

    Beaten to it!

    # December 20, 2011 at 4:57 pm

    Deja vu? Echo….? ;)

    # August 13, 2012 at 10:58 am

    Thank you very much, everyone! I completely forgot about this discussion.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".