• Resolved Webby

    (@webby2012)


    hey,

    I’ve searched a number of threads but not found the answer to this yet…

    I want to add a couple of div classes to my post. I added the code into my custom.css sheet and added the class accordingly, this however hasn’t worked?

    When I place the css directly into the post it works fine?

    Here is my css:

    <style type="text/css">
    div.yca_results_box_grey {
    	background:#ccc;
    	background:-moz-linear-gradient(top, #ccc, #eee);
    	background:-webkit-gradient(linear,0 0, 0 100%, from(#ccc), to(#eee));
    	box-shadow:inset 0 0 10px rgba(0,0,0,.4);
    	-moz-box-shadow:inset 0 0 10px rgba(0,0,0,.4);
    	-webkit-box-shadow:inset 0 0 10px rgba(0,0,0,.4);
    	}
    div.yca_results_box_green {
    	background:#ccc;
    	background:-moz-linear-gradient(top, #4f863b, #A9D47E);
    	background:-webkit-gradient(linear,0 0, 0 100%, from(#4f863b), to(#A9D47E));
    	box-shadow:inset 0 0 10px rgba(0,0,0,.4);
    	-moz-box-shadow:inset 0 0 10px rgba(0,0,0,.4);
    	-webkit-box-shadow:inset 0 0 10px rgba(0,0,0,.4);
    	}
    </style>

    Here is the page I am referring to: my post

    Please help!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Where are you adding your external CSS?

    Thread Starter Webby

    (@webby2012)

    In a custom.css file.

    /public_html/wp-content/themes/Empire.v1.0.7/empire/custom.css

    this is separate from the default stylesheet

    /public_html/wp-content/themes/Empire.v1.0.7/empire/style.css

    The code exactly as it’s placed in my custom style sheet is:

    /*-------------------------------------------------------------------------------------------*/
    
    /* YCA GAME Boxes CSS */
    
    /*-------------------------------------------------------------------------------------------*/
    
    div.yca_results_box_grey {
    
    	background:#ccc;
    
    	background:-moz-linear-gradient(top, #ccc, #eee);
    
    	background:-webkit-gradient(linear,0 0, 0 100%, from(#ccc), to(#eee));
    
    	box-shadow:inset 0 0 10px rgba(0,0,0,.4);
    
    	-moz-box-shadow:inset 0 0 10px rgba(0,0,0,.4);
    
    	-webkit-box-shadow:inset 0 0 10px rgba(0,0,0,.4);
    
    	}
    
    div.yca_results_box_green {
    
    	background:#ccc;
    
    	background:-moz-linear-gradient(top, #4f863b, #A9D47E);
    
    	background:-webkit-gradient(linear,0 0, 0 100%, from(#4f863b), to(#A9D47E));
    
    	box-shadow:inset 0 0 10px rgba(0,0,0,.4);
    
    	-moz-box-shadow:inset 0 0 10px rgba(0,0,0,.4);
    
    	-webkit-box-shadow:inset 0 0 10px rgba(0,0,0,.4);
    
    	}
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    May you remove your inline CSS so we can see why your external CSS isn’t working?

    Thread Starter Webby

    (@webby2012)

    All inline css from my div tags has now been removed.

    https://yorkshirechess.org/yca-league-reports-round-3/

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    In
    https://yorkshirechess.org/wp-content/themes/Empire.v1.0.7/empire/custom.css

    Can you close off this style

    #chess-upload-page .postsHead  {margin-bottom:10px; margin-bottom:35px

    Thread Starter Webby

    (@webby2012)

    omg! Thank you, this corrected the issue immediately…

    ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘div class in theme’ is closed to new replies.