2016-04-02 23 views
-1

Bir resimdeki satır içi paragrafı hizalama konusunda bir sorun yaşıyorum.Paragraf inline ile inline

<p id="intro">blah blah blah lots of text.</p> 
<img src="macro.jpg" height="476" id="photograph" width="267" /> 

CSS bu denedim:

#intro { 
    font-size: 0.8em; 
    color: black; 
    float: left; 
    } 

    #photograph { 
    float: right; 
    } 

Ama yine

cevap

0

Bunu akışkan hale getirmek için bu gibi yapabileceği yardım edin ... Onları hizaya görürsek size pencereyi yeniden boyutlandır.

See this fiddle

#photograph { 
    float: right; 
    width: 267px; 

} 
#intro {  
    width: calc(100% - 267px); 
    font-size: 0.8em; 
    color: black; 
    float: left; 
} 
0

Aradığınız böyle ti şey olduğunu ???

#intro { 
 
    font-size: 0.8em; 
 
    color: black; 
 
    
 
    } 
 

 
    #photograph { 
 
    
 
    } 
 
    .test{ 
 
     display:flex; 
 
     justify-content:space-between; 
 
     background-color:pink; 
 
     align-items: center; 
 
    }
<div class="test"> 
 
<p id="intro">blah blah blah lots of text.</p> 
 
<img src="macro.jpg" height="476" id="photograph" width="267" /> 
 
</div>