当前位置: 动力学知识库 > 问答 > 编程问答 >

html - Css issue: trying to place image and text in parent div

问题描述:

I know I'm missing something easy here but I've hit a wall and need a hand. I'm trying to achieve the following:

I'm using materialze CSS for the use of their grid.

<div class="container">

<div class="row">

<div class="col s6">

<h3 id="ipad-image"><img src="<%= asset_path('Main copy.png') %>"></h3>

</div>

<div class="col s4">

<h3 class="center">box 2 text</h3>

</div>

</div>

</div>

Anyone have any ideas what I should do?


This is the result.

网友答案:

try this.. it might work 1) remove h3 tag from image(img itself is a block level element) 2) you might need to define the width of image 3)

<div class="col s4">
            <h3 class="pull-right">box 2 text</h3>
 </div>
分享给朋友:
您可能感兴趣的文章:
随机阅读: