Jim R Posted May 3, 2012 Share Posted May 3, 2012 Using Firebug to find the style of a certain part of my WordPress theme, it shows the file as my URL http://hoosierhoopsreport.com with a #3 after it and a line number. Where do I find that? I see that a lot actually in various themes. I search all the files and can never the appropriate code. I need to change the body background, and using the override method isn't working. body[style]= #000099 !important; I've also tried it with the semi-colon after the hex code. Quote Link to comment https://forums.phpfreaks.com/topic/262016-overriding-styles-in-css/ Share on other sites More sharing options...
Jessica Posted May 3, 2012 Share Posted May 3, 2012 In wordpress, you can edit the theme and you'll see a file that ends in .css The syntax is body{ color: #000099; } Not sure if you're trying to do text or background. Quote Link to comment https://forums.phpfreaks.com/topic/262016-overriding-styles-in-css/#findComment-1342700 Share on other sites More sharing options...
Mahngiel Posted May 3, 2012 Share Posted May 3, 2012 If it has a filename with a number, it means the styling is on that page and not the stylesheet called in the head. Since WP is a compilation of various .php files you'll have to narrow it down by what the <style> is styling. But body[style] = #000099 isn't correct CSS syntax. body{ background-color: #000099; } Quote Link to comment https://forums.phpfreaks.com/topic/262016-overriding-styles-in-css/#findComment-1342701 Share on other sites More sharing options...
Jim R Posted May 3, 2012 Author Share Posted May 3, 2012 If it has a filename with a number, it means the styling is on that page and not the stylesheet called in the head. Since WP is a compilation of various .php files you'll have to narrow it down by what the <style> is styling. But body[style] = #000099 isn't correct CSS syntax. body{ background-color: #000099; } That didn't work because it's being overridden by the http://hoosierhoopsreport.com #3 line 31 style. There is no such line of code that even matches the style. It wasn't a file name. @jesirose, same thing...regular styling for body wasn't working, as it was overridden by the above. I was able to drill down to the div ID, and that worked. I'm surprised, but it works. Quote Link to comment https://forums.phpfreaks.com/topic/262016-overriding-styles-in-css/#findComment-1342720 Share on other sites More sharing options...
Jessica Posted May 3, 2012 Share Posted May 3, 2012 What is the exact URL you see for the page the style comes from? Firebug is not always 100% on these things in my experience. When you view the source, what files are being included for styles? Quote Link to comment https://forums.phpfreaks.com/topic/262016-overriding-styles-in-css/#findComment-1342724 Share on other sites More sharing options...
Mahngiel Posted May 3, 2012 Share Posted May 3, 2012 having a hard time figuring out what you're seeing. This is what I see: Quote Link to comment https://forums.phpfreaks.com/topic/262016-overriding-styles-in-css/#findComment-1342733 Share on other sites More sharing options...
Jim R Posted May 3, 2012 Author Share Posted May 3, 2012 My apologies. I typed the wrong URL. It shows: http://metroindybasketball.com #3 (line 101). I have since drilled down the to the div ID #top, which worked, but in other instances on other sites, I haven't been able to effectively produce what I want. How would I find that line? Quote Link to comment https://forums.phpfreaks.com/topic/262016-overriding-styles-in-css/#findComment-1342830 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.