Forums

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

Home Forums CSS display-inline-block margins do not collaspe with its neighbor?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #41867
    PicnicTutorials
    Participant

    I need two anchors to display side by side as buttons. I need their margins to collapse top and bottom with their neighbors. And I need them both or just one anchor to clear (so stay above) their below neighbor. Some times there will be both and some times only one. Display tables margins do collaspe but they do not allow for both anchors to go side by side. I could just wrap them both in a container but I dont want to.

    Ideas?

    TEST PAGE:

    http://www.websitecodetutorials.com/projects/testing.html

    #125765
    wolfcry911
    Participant

    can you leave them as inline? According to the specs whether they are inline-block, float, or AP the margins will not collapse…

    why not just target the anchors and remove the margin?

    #125766
    PicnicTutorials
    Participant

    Hello. Can’t do inline because I need a bottom margin on them. Can’t just target the anchors because I need one size fits all on 500 pages. Some times I’ll have paragraphs above or below them and sometimes not. If I can’t figure it out then ill just wrap them in a P float the anchors and margin the static P.

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