Forums

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

Home Forums CSS Trying to Be Responsive

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #35639
    DVG
    Member

    I’d like to display — hypothetically — four content boxes. We’ll call them A, B, C, and D. By default I want A and B on one row, and C and D on the next. I’d like each box to be (about) half the width of the page. If the browser is too narrow to display two boxes per row, though, or if the page is being viewed on a mobile device, I’d like the boxes to display in just a single column. (Am I making sense?)

    So:

    AB
    CD

    “Narrow” version:
    A
    B
    C
    D

    I’ve tried setting the width of each box to 50% (ish) and using floats, but when the page gets too narrow and B and D drop below A and C, all four boxes are (sadly) still only 50%, so that looks terrible.

    Thanks in advance!

    #92727
    DVG
    Member

    Ah!
    Thanks! That *does* seem to work.

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