Grow your CSS skills. Land your dream job.

Div problem

  • # November 2, 2012 at 11:32 pm

    Hi,
    I’ve created two divs, one on the top left side and the other under this (both with fixed dimensions).

    My problem is: I want a new div on the right side that its length ends with browser window’s width. How I can create this new div?

    I leave you an image for understanding this case:
    Link

    Thank you!

    # November 3, 2012 at 12:10 am

    @albertdt6 Like this? http://codepen.io/christopherburton/full/kEyKo

    I’m sure someone else can improve this.

    # November 3, 2012 at 2:51 am

    Nope…that looks good to me.

    # November 3, 2012 at 1:08 pm

    @ChristopherBurton Thank you for your quickly work but I’ve followed your instructions in my web page and the main div doesn’t start when sidebar’s div finnish. You can look my web page here : Link

    My sidebar’s div is in “styleInici.css” while main’s div (which is called “sliderFrame”) is in “js-image-slider.css”.

    Note: I’ve added some background color.

    Thank you!

    # November 3, 2012 at 1:51 pm

    add margin-left: 400px to #sliderFrame

    # November 3, 2012 at 2:03 pm

    Well I hadn’t considered this quick fix but it worked, thank you very much!

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

You must be logged in to reply to this topic.

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