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

Home Forums CSS DIV Alignment Inside a Paragraph

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #45795

    If you visit you’ll see an ad and ordered list sitting inside my #sidebar div. The problem is that this div is being inserted after the second paragraph and refusing to line up with the top of the second paragraph.

    What is so confusing to me is that I tried the same thing in CodePen and it worked like a charm.

    Any idea why my sidebar div lines up correctly in CodePen but not on my site?


    Have you checked and compared the source? You have two divs and another p between the sidebar and what you’re terming the second p. The rogue p with the button child is taking up space.

    By the way, you should validate – block level elements inside a span are invalid (among other things).

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