Home > Back-end >  How to allign this tags side by side?
How to allign this tags side by side?

Time:09-18

Home

Contact

How ca i allign this tag side by side?

CodePudding user response:

try this: {display: inline-block};

CodePudding user response:

either display:inline or float:left which gives more control (but needs <div style="clear:both"></div> afterwards)

h1 {
  float: left;
  margin-right: 10px;
}
before
<nav>
  <h1>hello</h1>
  <h1>world</h1>
  <div style="clear:both"></div>
</nav>
after

CodePudding user response:

nav {
  display: flex;
}
before
<nav>
  <h1>hello</h1>
  <h1>world</h1>
  <div style="clear:both"></div>
</nav>
after

  • Related