Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS ID’s issue. Unable to style.

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #44272
    thetechfreak
    Member

    [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

    Why is that happening ? And why I am getting red color by default ? I haven’t specified any styling. Moreover the wrapper is styled as background-color:blue so even if the color had to come it should be blue, no? I am really frustrated and have been trying to solve it for past 1 day, but to no help.

    Looking forward for some solution ! Thanks! :)

    #132544
    thetechfreak
    Member

    edit : I am not able to write html markup. Please take a look at http://pastebin.com/7KNgrneF

    Thanks :)

    #132548
    Merri
    Participant

    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.

    #132552
    chrisburton
    Participant

    Better yet, post your code into Code Pen.

    #132557
    thetechfreak
    Member

    ^ Here you go : http://cdpn.io/djJKk


    @Merri
    Thanks for the solution,I’ll try it asap

    #132662
    jurotek
    Participant

    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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.