css - Set background color for div in bootstrap


Keywords:css 


Question: 

I've image need code css:

enter image description here

And here my html

<div class="row dvMarTop1">
                <div class="col-sm-6" >
                    <div class="row">
                        <div class="col-sm-7" >
                            <img src="images/img230.jpg" class="img-responsive" />
                        </div>
                        <div class="col-sm-5" style="background-color: #f1f1f1;">
                            <div>
                                <div>Tiêu điểm</div>
                                <div>Mark Zuckerberg thất vọng vì vệ tinh 200 triệu USD bị tên lửa SpaceX thiêu rụi</div>
                            </div>
                        </div>

                    </div>
                    <div class="row dvMarTop1" style="background-color:#fff">
                        <div class="col-sm-4">
                            <img src="http://imgur.com/79u89Sj" class="img-responsive" />
                        </div>
                        <div class="col-sm-8">

                            <span>
                                Nghệ An: Cá chết dạt do thuyền chở cá chìm
                                <font><i class="fa fa-clock-o dvMarTop1 dvTimeItem"></i> &nbsp;20:00 | Chủ nhật, 15/06/2016</font>
                            </span>
                        </div>
                    </div>

                </div>

But as you see I cannot set full background for col-sm-5 and set vertical center text

Can you suggest more ? tks so much


1 Answer: 

Either you didn't refresh your browser page after you edited the code or you didn't place your style.css under the other CSS links in the head part of the code.