Yahoo Answers is shutting down on 4 May 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

images and elements falling off the edge of div when window gets smaller?

I have a centered div element with images, gif actions, menu bars, etc. but when it is opened into a window that is too small the elements fall down to the next line instead of hiding.

I've never seen this happen before! Only in tables that are too small. But im not using a table, promise! (I despise thee, o table).

But anyway, what can i do to get my elements to float and stay in place rather than jump to the next line?

2 Answers

Relevance
  • Tobias
    Lv 7
    1 decade ago
    Favourite answer

    You can do this by defining the CSS overflow property. I think the correct value of overflow is 'hidden' in this case. By this, the outer div box should just stay in line and, if overflowing, the browser shouldn't put them in a new line.

    This is the code:

    <div id="OuterBox" style="overflow:hidden;">

    <!-- Other content comes here -->

    </div>

    More information for example on http://www.w3schools.com/Css/pr_pos_overflow.asp

  • Anonymous
    1 decade ago

    Use percentages for a more fluid page, but if you want the overflow to hide, use: overflow: hidden;

    Ron

Still have questions? Get answers by asking now.