Forums

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

Home Forums CSS Gap

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #23495
    marina_a_sh
    Member

    Please, help.

    I’m using Firefox.
    I can’t figure out why there is a gap between ‘yellowPiece’ and ‘connection’ while there is no gap between ‘connection’ and ‘just text’.
    They all look similar to me, all are inline elements and should go one after the other respecting horizontal margins, borders, and paddings. FireBug didn’t reveal any suspicious ones.

    Code:



    yellowPiece


    Just text



    #51095
    Jonz
    Member

    You should try using div class instead of the span for your connections as well.
    Just have to change the markup a little. Formatted the yellowpiece span just like the "Just Text" one and that fixed it. You sometimes run into these problems and the easiest fix is just changing how the code is layed out. weird I know

    Code:

    yellow Piece


    Just text


    #51100
    Jonz
    Member

    @ikthius nicely done, explains it for me too

    #76864
    marina_a_sh
    Member

    Thank you.

    I haven’t seen your answer until now. :)
    I was looking through old stuff on my computer and saw this long forgotten problem. I finally figured out on my own that the problem was in white spaces and ‘new lines’ and decided to answer my own question.

    It is ugly but also possible to write:
    > >…

    #76856
    marina_a_sh
    Member

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