0

In snippet you can see, that if i want to past floated button/group they cant keep position in relative segment. Whats wrong with my layout? Code listing u can see https://codepen.io/saveurmind/pen/oWXWOa Content of header placed in segment, I'm using full size column(16) in raw. If i use buttons without "right floated" - all is ok. enter image description here

<div class="row">
   <div class="sixteen wide column"> 
    <div class="header-bar">
    <div class="ui segment">
     <div class="header-content">
      <h3 class="ui header">Title</h3>
      <div class="ui right floated basic buttons">
       <div class="ui button">One</div>
       <div class="ui button">Two</div>
       <div class="ui button">Three</div>
      </div>
     </div>
    </div>
    </div>
   </div>
  </div>
Some Berry
  • 37
  • 5

1 Answers1

2

You can use clearfix to contain your child element in your parent block.

.clearfix:after {
   content: " "; /* Older browser do not support empty content */
   visibility: hidden;
   display: block;
   height: 0;
   clear: both;
}

If you want title with same line as btn, two way to go:

  1. change h3 to span (cus h1~h6 will take the whole line)

https://codepen.io/hdl881127/pen/bWdRVp

  1. if you want keep h3, then you need to add a new class called

https://codepen.io/hdl881127/pen/BRNZLj

.inlineblock{
  display:inline-block;
}

More info about clearfix you can read it here:

What is a clearfix?

Community
  • 1
  • 1
Dalin Huang
  • 11,212
  • 5
  • 32
  • 49