html - How to place a text and a rectangle (with some text) in the same line in CSS? -


i have fiddle in there text , rectangles having text placed vertically.

i wondering how can put text , rectangle (having text) align in same line , @ center of page, this text , box(having text) align in same line @ center of page.

i tried using float: left, float: right, display: inline-block , display: block in classes unfortunately didn't work.

the html code every job opening class is:

<div class="job-opening1">      <p class="section1">development & design</p>      <div class="rectangle">          <p class="job-title">web designer</p>          <p class="job-description">qualifications go here</p>      </div> </div> 

one option use float:right .rectangle , clear:both .openings div, this:

/**** openings start *****/    .openings .headline-text:before {  border-top: 1px solid #1072b8;  display: block;  position: relative;  top: -25px;  margin: 0 auto;  width: 50%;  content: "";  }    .openings .headline-text {  text-align: center;  font-size: 24px;  color: #1072b8;  padding-top: 60px;  font-weight: bold;  }    .openings .rectangle {  border-radius: 10px;  display: inline-block;  margin-bottom: 30px;  margin-right: 5px;  width: 250px;  height: 100px;  border: 1px solid #000;  background-color: white;  padding: 10px 10px 10px 100px;  position: relative;  float: right;  }  .section{    float:left;  }  .openings .job-opening{  clear:both;  }      /**** openings finish *****/
    <div class="openings">          <p class="headline-text">departments</p>          <div class="job-opening">              <p class="section">development & design</p>              <div class="rectangle">                  <p class="job-title">web designer</p>                  <p class="job-description">qualifications go here</p>              </div>          </div>            <div class="job-opening">              <p class="section">full stack developer</p>              <div class="rectangle">                    <p class="job-title">full stack developer</p>                  <p class="job-description">qualifications go here</p>              </div>          </div>            <div class="job-opening">              <p class="section">marketing director</p>              <div class="rectangle">                  <p class="job-title">marketing director</p>                  <p class="job-description">qualifications go here</p>              </div>          </div>            <div class="job-opening">              <p class="section">marketing analyst</p>              <div class="rectangle">                    <p class="job-title">marketing analyst</p>                  <p class="job-description">qualifications go here</p>              </div>          </div>      </div>


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -