Fishpaws
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Child CSS Not Overriding Parent Stylesheet/sOK, I will. Thank you for all of your assistance and suggestions, I think I’m simply going to find a different theme to work with!
J
Forum: Themes and Templates
In reply to: Child CSS Not Overriding Parent Stylesheet/sWell first, off, adding !important after the attribute in the Child “style.css” file worked immediately. So I see that this is the sure-fire way to determine priority.
I took a look in the source code as you suggested to see what order the themes are being interpreted. Here’s what I found:
<link rel="stylesheet" href="https://127.0.0.1/modules/asenville/wp-content/themes/designfolio-child/style.css" type="text/css" media="screen" /> <meta name='robots' content='noindex,nofollow' /> <link rel='stylesheet' id='fancybox-stylesheet-css' href='https://127.0.0.1/modules/asenville/wp-content/themes/designfolio/api/js/lightboxes/fancybox-1.3.4/jquery.fancybox-1.3.4.css?ver=3.5.1' type='text/css' media='all' /> <link rel='stylesheet' id='color-scheme-stylesheet-css' href='https://127.0.0.1/modules/asenville/wp-content/themes/designfolio/includes/css/color_schemes/default.css?ver=3.5.1' type='text/css' media='all' /> <script type='text/javascript' src='https://127.0.0.1/modules/asenville/wp-includes/js/jquery/jquery.js?ver=1.8.3'></script> <script type='text/javascript' src='https://127.0.0.1/modules/asenville/wp-content/themes/designfolio/api/js/html5/modernizr/modernizr.custom.97935.js?ver=3.5.1'></script> <script type='text/javascript' src='https://127.0.0.1/modules/asenville/wp-content/themes/designfolio/api/js/html5/modernizr/pc_modernizr_custom.js?ver=3.5.1'></script> <script type='text/javascript' src='https://127.0.0.1/modules/asenville/wp-content/themes/designfolio/api/js/misc/superfish-1.4.8/js/superfish.js?ver=3.5.1'></script> <script type='text/javascript' src='https://127.0.0.1/modules/asenville/wp-content/themes/designfolio/includes/js/pc_superfish_init.js?ver=3.5.1'></script> <script type='text/javascript' src='https://127.0.0.1/modules/asenville/wp-content/themes/designfolio/api/js/lightboxes/fancybox-1.3.4/jquery.fancybox-1.3.4.pack.js?ver=3.5.1'></script> <script type='text/javascript' src='https://127.0.0.1/modules/asenville/wp-content/themes/designfolio/api/js/presscoders/custom-fancybox.js?ver=3.5.1'></script> <script type='text/javascript' src='https://127.0.0.1/modules/asenville/wp-content/themes/designfolio/api/js/lightboxes/fancybox-1.3.4/jquery.easing-1.3.pack.js?ver=3.5.1'></script> <script type='text/javascript' src='https://127.0.0.1/modules/asenville/wp-content/themes/designfolio/api/js/lightboxes/fancybox-1.3.4/jquery.mousewheel-3.0.4.pack.js?ver=3.5.1'></script> <style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style> </head>
Indeed, my child “style.css” file is first link listed, and the color-specifying “default.css” shows up 2 links later. So this seems to prove your intuition correct – that my child file was composed correctly, but it’s instructions are being erased by subsequent instructions from the “default.css” file.
So, what does this mean? I’m happy to use the workaround that you just showed me, but there’s gotta be something else wrong here right? Or may is this theme just a piece of crap that doesn’t compile correctly?
Forum: Themes and Templates
In reply to: Child CSS Not Overriding Parent Stylesheet/sThank you all for your replies. Right now the file is a local instillation I’m running through Easy PHP. I will try and find time to upload it today.
WPyogi – re: screenshot. The code circled in red is the original code for the template that resides in a file called “default.css” in the “Includes” folder for the theme. The code circled in green is the code that I added to the child “style.css” file. My point in including this was to show that I’ve copied the original code and placed it in the child file, and yet the child values are not taking precedence.
In “default.css”:
#header-container, .footer-widget-container {
background: #253944;
}What I placed in the child “style.css”:
#header-container, .footer-widget-container {
background: #E01B6A;
}Why is the child “style.css” attributes not overriding the exact same attribute in the “default.css” sheet? Instead, as you see on the screenshot, it’s struckthrough.
Right now my understanding is that the only URL import I need to add is the primary /theme/style.css link.