zdarkmind94 Posted August 29, 2014 Share Posted August 29, 2014 Why if my <h1> is on a div, and I put on that div custom color ,<h1> have the default color ,and the rest of things for example <p> have the custom color Link to comment Share on other sites More sharing options...
dsonesuk Posted August 29, 2014 Share Posted August 29, 2014 (edited) Any chance of relevant html and css, or do you want us to guess until we finally come upon a solution. Edited August 29, 2014 by dsonesuk Link to comment Share on other sites More sharing options...
niche Posted August 29, 2014 Share Posted August 29, 2014 Please post some code to demo you question. 1 Link to comment Share on other sites More sharing options...
funbinod Posted August 29, 2014 Share Posted August 29, 2014 (edited) I think he means with the code like---- <div style="color:#F00"> // edited <h1>Hello World</h1></div> it will work if you put <div> inside <h1>. like --- <h1><div style="color:#F00"> // edited Hello World</div></h1> but I suggest, when u r using style to a <div> or <p> or whatever, you need not to use <h1> or <h2> or whatever. just extend ur style with font:size; font-weight or whatever u need..... Edited August 30, 2014 by funbinod 1 Link to comment Share on other sites More sharing options...
dsonesuk Posted August 29, 2014 Share Posted August 29, 2014 Oh good guess, hope its right, just note if div inside h1 however it is invalid. Link to comment Share on other sites More sharing options...
funbinod Posted August 29, 2014 Share Posted August 29, 2014 actually I suggest not to use <h1> but to do everything inside style..... Link to comment Share on other sites More sharing options...
dsonesuk Posted August 29, 2014 Share Posted August 29, 2014 ???? More confused now, If you set color (note: style="color:#F00;" NOT style:"color:#F00;") stying to parent div all child element will adopt parent color unless h1 has somehow been given a color styling with higher precedence as when used along with a id reference, which we will never know unless the html and css styling is provided so we don't as said from the start GUESS! Link to comment Share on other sites More sharing options...
niche Posted August 29, 2014 Share Posted August 29, 2014 if the op still needs an answer, they'll post some code. Link to comment Share on other sites More sharing options...
shakir Posted August 31, 2014 Share Posted August 31, 2014 // edited Hello World NIce example, this color could be work on h1 tag. Link to comment Share on other sites More sharing options...
zdarkmind94 Posted September 2, 2014 Author Share Posted September 2, 2014 <div class="content row"> <div class="large-8 large-centered columns"> <h2>Lorem ipsum</h2> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Omnis, deserunt, ipsam, magni ex architecto id harum repudiandae cumque modi dolorum obcaecati tempora eius ad et perferendis ratione eum mollitia adipisci.</p> <a href ="#0" class="button readmore">Citeste tot</a> </div> </div> and i put the next css .content { position: relative; z-index: 4; color: #fff; text-align: center; padding-top: 5%; } why i need to put ( .content h2 {color:#fff;} ) to transform my h2 white? Link to comment Share on other sites More sharing options...
dsonesuk Posted September 2, 2014 Share Posted September 2, 2014 (edited) Because it is, it seems, using a grid system, it is probably using css selector somewhere that has a higher precedence than your current css styling, if you look at the header within firebug it should show the selector styling the header, you then have to use the same selector, that is positioned lower than current as the styles are applied, OR give it a selector that would give it a totally higher precedence over current. Edited September 2, 2014 by dsonesuk Link to comment Share on other sites More sharing options...
srinivas g Posted September 7, 2014 Share Posted September 7, 2014 Hi try this code, by changing below div color value entire elements (exclusive of anchor) color will be change. What is ur problem exactly? <html><head><style> .B {color:#FF0909;} // put A instead of class B </style></head> <body> <div class="A"> <div class="B"> <h1>Lorem ipsum</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Omnis, deserunt, ipsam, magni ex architecto id harum repudiandae cumque modi dolorum obcaecati tempora eius ad et perferendis ratione eum mollitia adipisci.</p> <a href ="#0" class="button readmore">Citeste tot</a> </div> </div> </body> </html> Link to comment Share on other sites More sharing options...
eurohttp Posted September 8, 2014 Share Posted September 8, 2014 You need to input for body default color in stylesheet, all rest formatting sections will follow the same unless you haven't changed it to some other color or your other values have changed maybe by using a CMS of some kind? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now