Grow your CSS skills. Land your dream job.

I lose the “Auto” Height

  • # February 12, 2013 at 2:08 pm

    When I put this div in

    http://codepen.io/anon/pen/lhndq

    I lose the “Auto” setting of the Height Style in the #page_wrap

    http://guaposcapecod.com/main_copy.html
    In this one the #page_wrap height is auto fit for the content

    http://guaposcapecod.com/main_no_auto.html
    You’ll see in this one the bottom is now cut-off, as if the auto in #page_wrap is static again…

    # February 12, 2013 at 3:03 pm

    Wow…what’s all this about?

    #main-content-wrap {
    margin: -610px 10px 40px 425px;

    # February 12, 2013 at 3:13 pm

    Looks like that is left-over code. I can’t find where it’s needed….

    # February 12, 2013 at 3:16 pm

    Dunno….you have that element which looks like it should hold stuff…but there is nothing in it.

    # February 12, 2013 at 3:25 pm

    Yep, I just took it out, and everything works without it (with the exception of the issue in the post of not fitting all the content in the #page-wrap box dynamically) . That code above was not needed. THanks for noticing that code-dirt.

    # February 12, 2013 at 3:26 pm

    I think you need to look at the HTML structure. You seem to be moving things around using large margin values which will break pages and create all sorts of strange effects.

    # February 12, 2013 at 3:29 pm

    Ugh…seems I lied (didn’t clear my cache).

    So #main-content-wrap contains the image for the main page. It’s the image that has the photo of people in it.

    It’s called in the code of the html file just above the footer div’s

    # February 12, 2013 at 3:30 pm

    ok I’ll play with the HTML and see what I can figure out. Thanks for looking !

    # February 12, 2013 at 3:40 pm

    I would look into how floats work….it’s going to remove a lot of the need for those odd margins.

    # February 12, 2013 at 3:42 pm

    yeah the odd margins are driving me nuts. I’ll definitely look into floats.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".