Forums

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

Home Forums CSS Why is this table not aligning my content?

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #39127
    niwuc
    Member

    As you can see, I have a live twitter feed and two icons all contained into a table so they will align (its the only way I’ve been able to do this). Why does the table add an extra 13px to the feed? There is no margin style on any of the CSS or cell padding. Thoughts?

    #106980
    niwuc
    Member
    #106984
    wolfcry911
    Participant

    my first thought is – never use tables for layout…

    The reason there’s an extra 13 pixels at the top is that the images are aligned to the font baseline by default which pushes them up a little. You could set them to vertical align: bottom; or display: block; – either will work. But I’d try to redo it without the table. You should be able to float them without any trouble (and jnh will suggest inline-block ;)

    #106988
    niwuc
    Member

    how would I apply the float to my css or inline block? would I turn each individual thing into a div?

    #106989
    niwuc
    Member

    got it! thanks!

    #106990
    wolfcry911
    Participant

    I would change this



















      to this





        and float the ul and img left with a width of 900 on the ul
        edit// you don’t really need to wrap everything in a div to float. and I see that you added a third image. The triangle really should be a background image (its not content) perhaps on the ul and the inline styling isn’t good practice – move it to the stylesheet

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