- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
[MOD EDIT] See Codepen referred to further down for code.
My problem is that I am not able to style anything in div id=”try” and
edit : I am not able to write html markup. Please take a look at http://pastebin.com/7KNgrneF
Thanks :)
You’ve put red as the background color of all paragraphs. So #try has it’s styles set, paragraph background color just is drawn on top of it.
So your lesson here: write HTML that lets you target more precisely the element you want to have in red.
Better yet, post your code into Code Pen.
^ Here you go : http://cdpn.io/djJKk
@Merri Thanks for the solution,I’ll try it asap
The reason your blue background shows only behind the header is that the parent which is wrapper holds floated elements which are naturally taken out of document flow and wrapper acts like they not there at all and is collapsed to height of the header only. To fix that, you need to give wrapper overflow:hidden