Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Member XternalRage's Avatar
    Join Date
    Dec 2012
    Posts
    33
    Member #
    34041
    I currently have two DIV elements placed side by side. One is floated left and the other right. I want to keep them side by side when shrinking the page. Right now if I set my browser to take up half my screen on of the DIV elements will move below the other making you scroll down. Any one have any fixes for this?

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    There really isn't one, unless you define the divs and the content inside of them in relative terms (as in percentages as opposed to pixels). Even then, sooner or later you're probably going to hit a float drop.

    The only other way around it is to put your two floats inside of a container and set a minimum width for that container such that the stuff inside will always fit.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Member XternalRage's Avatar
    Join Date
    Dec 2012
    Posts
    33
    Member #
    34041
    yeah but the inner content contains an image. Its just frustrating when the left side is the navbar i cant shrink the browser to half my screen without dropping the main content section below.

  5. #4
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Media query magic time.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  6. #5
    Member XternalRage's Avatar
    Join Date
    Dec 2012
    Posts
    33
    Member #
    34041
    I got it to work. I had to set a bunch of minimum widths to get it to work just right though.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:06 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com