Forums

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

Home Forums CSS Text inside containers invading the space of other elements

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #273826
    david.mark.walton
    Participant

    The text inside specially made containers (HTML and CSS codes below) often invades the space of the elements beneath it. How much the text invades depends on how much text is being used within a container and which device the webpage is being viewed on.

    Example HTML code:

    div class=”sp – container”
    …text…
    /div

    Correlating CSS code:
    .sp-container{
    width: 50%;
    float: right;
    }

    #273830
    Paulie_D
    Member

    We’d need to see an actual minimal demo, ideally in Codepen.io but my first question would be..

    Have you cleared the floats?

    #273854
    david.mark.walton
    Participant

    I’ve cleared the floats and have solved the problem.

    Thanks very much Paulie_D!

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