html - display:inline-block and display:inline Property Clarification Do what to use -


as trying move subscribe button little more should in centre of text @ left side.

if use display:inline can able achieve expecting for

but same thing want achieve in display:inline-block

and used

width:400px

for

.panel3 #cont

if zoom in browser text not wrapping inside width:400px, need responsive of text should break down automatically inside div when zoomed also.

here fiddle http://jsfiddle.net/mohamedmusthafac/gbgb4/10/

html

<div class="panel3"> <div id="wrap" style="padding:0.4in"> <div id="button">     <input type="submit" value="subscribe"/> </div> <div id="cont" align="left"> lorem ipsum dummy text of printing , typesetting industry lorem ipsum. </div>  </div> </div> 

css

.panel3 {     width:100%;     min-height:120px;     background-color: #233247;     border-top: 5px solid #fff;     color: white; } .panel3 div div {     display:inline-block; } .panel3 #cont {     font-size: 21px;     width:400px;     min-width:100px;     text-align: left;     word-wrap:break-word;     padding-left: 30px; } .panel3 #button input[type="submit"] {     margin: 0px;     margin-top:-30px;     min-height: 45px;     width: 200px;     border:5px solid #fff;     border-radius: 5px;     background-color:#233247;     color: white;     font-size: 16px; } 

give

  .panel3 #button { margin-right:30px; } 

and remove padding the,

 .panel3 #cont { padding:0px; } 

working link : http://jsfiddle.net/husen/gbgb4/5/

also have add media query mobile achieve this,

  @media (max-width: 767px) {  .panel3 #cont { display:inline-block; }   } 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -