html - Aligning responsive Bootstrap images with caption title text -
I have these 3 column images titles, caption ad icons that I could not properly align. Is caption and title text okay according to image width? What is the best practice to deal with these types of materials? Should I align CSS for each screen size?
@import url ('http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css'); .urun-text {position: absolute; Background color: RGBA (15, 15, 15, 0.93); Color: #fff; Bottom: 0 pixels; Align text: left; Padding: 20px 15px 20px 15px; } .Ur-title {status: complete; Bottom: 80px; Align text: left; Z-index: 15; Padding-top: 5px; Padding-down: 5px; Color: #fff; Padding-left: 20px; Text-shadow: 0 1 px 2 px rgba (0, 0, 0, .6); Background color: RGBA (194, 0, 0, 0.93); Width: 100%; }. Click - arrow-right {status: complete; Z-index: 16; Color: #fff; Font-size: 10px; Bottom: 0 pixels; Correct: 33px; }
& lt; Div class = "container" & gt; & Lt; Div class = "row" & gt; & Lt; Div class = "col-md-4" & gt; & Lt; Div class = "product-box" & gt; & Lt; Img src = "http://i.imgur.com/xkAVZ3b.jpg" alt = "uni user" class = "align-center img-liability" & gt; & Lt; Div class = "urun-title" & gt; & Lt; Span class = "glyphicon glyphicon-star" & gt; & Lt; / Span & gt; YENİ ÜRÜNLER & lt; / Div & gt; & Lt; Div class = "urun-text" & gt; Searching for these mobile devices. & Lt; / Div & gt; & Lt; Div class = "click-arrow-right" & gt; & Lt; Span class = "glyphicon glyphicon-arrow-right" & gt; & Lt; / Span & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "col-md-4" & gt; & Lt; Div class = "product-box" & gt; & Lt; Img src = "http://i.imgur.com/xkAVZ3b.jpg" alt = "Uni user" class = "align-center img-liability" & gt; & Lt; Div class = "urun-title" & gt; & Lt; Span class = "glyphicon glyphicon-star" & gt; & Lt; / Span & gt; YENİ ÜRÜNLER & lt; / Div & gt; & Lt; Div class = "urun-text" & gt; Searching for these mobile devices. & Lt; / Div & gt; & Lt; Div class = "click-arrow-right" & gt; & Lt; Span class = "glyphicon glyphicon-arrow-right" & gt; & Lt; / Span & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "col-md-4" & gt; & Lt; Div class = "product-box" & gt; & Lt; Img src = "http://i.imgur.com/xkAVZ3b.jpg" alt = "Uni user" class = "align-center img-liability" & gt; & Lt; Div class = "urun-title" & gt; & Lt; Span class = "glyphicon glyphicon-star" & gt; & Lt; / Span & gt; YENİ ÜRÜNLER & lt; / Div & gt; & Lt; Div class = "urun-text" & gt; Searching for these mobile devices. & Lt; / Div & gt; & Lt; Div class = "click-arrow-right" & gt; & Lt; Span class = "glyphicon glyphicon-arrow-right" & gt; & Lt; / Span & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div
here you go
.product-box {display: inline-block; Status: Relative; } .Ur-heading {width: 100%; }. High-Text {Width: 100%; }
Setting the display to inline-block
allows the .product-box
as the prevalence of content only ( I.e., image), and position: relative
allows us to set the nested .urur-title
and .urur-text
elements width 100% of the width of .product-box
Comments
Post a Comment