Text block over image with background the same length of the image - html

I'm trying to create a text block with transparent background which is the same width as the image. However if I just add padding to the header then some may overlap or not be long enough due to the varying length in text.
Currently looks like this: http://puu.sh/sdBCX/994cc31da8.png
Here is the relevant HTML:
<div class="container-fluid">
<div class="row">
<div class="artist-grid">
<div class="col-lg-2"></div>
<div class="col-lg-2">
<img id="#artistTile" src="https://dummyimage.com/300x300">
<h3><span>BASSNECTAR</span></h3>
</div>
<div class="col-lg-2">
<img id="#artistTile" src="https://dummyimage.com/300x300">
<h3><span>DATSIK</span></h3>
</div>
<div class="col-lg-2">
<img id="#artistTile" src="https://dummyimage.com/300x300">
<h3><span>CHAINSMOKERS</span></h3>
</div>
<div class="col-lg-2">
<img id="#artistTile" src="https://dummyimage.com/300x300">
<h3><span>ZEDS DEAD</span></h3>
</div>
<div class="col-lg-2"></div>
</div>
</div>
</div>
And the relevant CSS:
h3 {
position: absolute;
top: 244px;
width: 100%
}
h3 span {
color: white;
background: rgb(0, 0, 0);
background: rgba(0, 0, 0, 0.7);
padding: 10px;
}
.artist-grid {
padding-top: 22px;
}
#artistTile {
position: relative;
max-width: 100%;
}
Cheers!

div {
width: 200px;
height: 200px;
display: block;
position: relative;
}
div::after {
content: "";
background: url(image.jpg);
opacity: 0.5;
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
z-index: -1;
}

Related

How to opacify only the background outline?

I want to opacify just the outline of the background, that small part between the yellow container and the end of the VP. Could you please help me? Thank you.
HTML
`e
.menu-jumbotron {
background: #160b00;
background-image: url("/Users/Desktop/PROJECTS/STELLINA 2/images/food-img.jpg");
background-size: cover;
max-width: 100%;
}
.jumbotron-form {
background: #160b00 !important;
}
.border {
width: 100%;
height: 40.58rem;
border: 2px solid #fed675 !important;
}
.opacity-bg {
width: 65%;
height: 100%;
background: rgba(22, 11, 0, 0.9);
}
<section class="welcome-section">
<div class="jumbotron menu-jumbotron jumbotron-fluid">
<div class="container menu-container">
<div class="border">
<div class="opacity-bg">
<div class="headers">
<h3 class="inner-text small">vieni a trovarci</h3>
<h1 class="header display-4">Etoile Food Bar & Cocktails</h1>
</div>
<div class="phone-number-outer">
<div class="phone-number-inner">
<p>123-456789</p>
</div>
</div>
<div class="menu-button">
<button type="button" class="menu-btn btn btn-primary button-wrapper">Scopri il nostro menu</button>
</div>
</div>
</div>
</div>
</div>
</section>
Background that I want to opacify`
Is this what you try to achieve?
.menu-jumbotron {
background-color: #c7731f;
background-image: url('https://via.placeholder.com/1000x1000.jpg');
background-size: cover;
max-width: 100%;
}
.jumbotron-form {
background: #160b00 !important;
}
.border {
display: flex;
width: 100%;
height: 40.58rem;
border: 2px solid #fed675 !important;
}
.opacity-bg {
width: 65%;
height: 100%;
background: rgba(22, 11, 0, 0.5);
}
<section class="welcome-section">
<div class="jumbotron menu-jumbotron jumbotron-fluid">
<div class="container menu-container">
<div class="border">
<div class="opacity-bg">
<div class="headers">
<h3 class="inner-text small">vieni a trovarci</h3>
<h1 class="header display-4">Etoile Food Bar & Cocktails</h1>
</div>
<div class="phone-number-outer">
<div class="phone-number-inner">
<p>123-456789</p>
</div>
</div>
<div class="menu-button">
<button type="button" class="menu-btn btn btn-primary button-wrapper">Scopri il nostro menu</button>
</div>
</div>
</div>
</div>
</div>
</section>
This was an interesting problem to tackle. I came up with two possible ideas: one is somewhat complex but uses true opacity, and the other is simpler but uses a trick to fake opacity.
True Opacity Solution
The idea is to use two background images. The first one will have opacity applied to it, and the other will not. Two images are required since, to my knowledge, you can't apply opacity to just part of the image.
* {
margin: 0;
}
section.welcome {
--padding: 3em;
--border-width: 0.25em;
position: relative;
padding: var(--padding);
}
.bg {
position: absolute;
background-image: url('https://wallpapercave.com/wp/1OXITrf.jpg');
background-size: cover;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
}
section.welcome > .bg {
opacity: 0.25;
}
.inner {
position: relative;
border: var(--border-width) solid red;
overflow: hidden;
}
.inner .bg {
background-position: calc(var(--padding) * -1 - var(--border-width)) calc(var(--padding) * -1 - var(--border-width));
width: calc(100% + 2 * var(--padding) + 2 * var(--border-width));
}
.content {
color: #fff;
background: rgba(0, 0, 0, 0.75);
min-height: 10em;
width: 65%;
}
<section class="welcome">
<div class="bg"></div>
<div class="inner">
<div class="bg"></div>
<div class="content">
<p>Hello world</p>
</div>
</div>
</section>
The trickiest bit is getting the images to align. Since there are two background images at play, in order for the effect to look cohesive, background-position must be carefully calculated so it aligns with the opacity-ified image.
The key line, which moves the inner image backwards by an amount equal to the welcome sections padding and the content's border width:
background-position: calc(var(--padding) * -1 - var(--border-width)) calc(var(--padding) * -1 - var(--border-width));
Using Shadow to Fake Opacity
Opacity is used to allow part of the background to show through. If you know that the background is white or some other color, then you can fake opacity by using box-shadow. This solution is simpler since it only requires one background image now, but you still want to calculate the size of the shadow for best effect.
* {
margin: 0;
}
section.welcome {
--padding: 3em;
--border-width: 0.25em;
position: relative;
padding: var(--padding);
background-image: url('https://wallpapercave.com/wp/1OXITrf.jpg');
background-size: cover;
}
.inner {
border: var(--border-width) solid red;
box-shadow: 0 0 0 calc(var(--border-width) + var(--padding)) rgba(255, 255, 255, 0.75);
}
.content {
color: #fff;
background: rgba(0, 0, 0, 0.75);
min-height: 10em;
width: 65%;
}
<section class="welcome">
<div class="inner">
<div class="content">
<p>Hello Woorld</p>
</div>
</div>
</section>

Position <a> tag but don't include overflow (position: absolute) image

So, hard to explain, but I'm trying to position a link over the entire abstract background, but not include the overflow of the other image placed on top. I've tried about everything I could think of, and couldn't come up with a solution. Wrap all the images in the tag, and I couldn't figure out how to size it to only include the abstract background image border. Only wrap the abstract background and text, can't get it to include the overlaid image (within the border of the abstract background of course).
Am I trying to accomplish the impossible?
img {
max-width: 100%;
}
.cat-item-container {
display: flex;
flex-wrap: wrap;
padding-top: 50px;
}
.category-heading {
width: 100%;
text-align: center;
}
.cat-item {
width: 44%;
margin: 5% 3%;
position: relative;
}
.cat-background-img {
position: relative;
border-radius: 20px;
}
.cat-background-orange {
filter: hue-rotate(74deg);
}
.cat-item-img {
position: absolute;
z-index: 999;
bottom: 50%;
width: 70%;
}
.cat-title-container {
position: absolute;
z-index: 9999;
bottom: 20%;
left: 5%;
}
.cat-title {
color: white;
font-weight: 600;
font-size: 4vw;
text-shadow: 0px 0px 7px #3e3e3e;
margin: 0;
}
.cat-item a {
display: block;
}
#media screen and (min-width: 1200px) {
.cat-title {
font-size: 48px;
}
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<div class="shop-by-category container">
<div class="category-heading">
Shop by Category
</div>
<div class="cat-item-container">
<div class="cat-item">
<a href="/category/water-slides/">
<img class="cat-item-img water-slide" src="//files.sysers.com/cp/upload/vzcpr/editor/full/blue-marble-water-slide.png">
<img class="cat-background-img cat-background-orange" src="//files.sysers.com/cp/upload/vzcpr/editor/full/cat-background-orange.jpg">
<div class="cat-title-container">
<p class="cat-title">Water Slides</p>
</div>
</a>
</div>
<div class="cat-item">
<img class="cat-item-img combo-house" src="//files.sysers.com/cp/upload/vzcpr/editor/full/Tiki-bounce-combo.png">
<a href="/category/bounce-and-slide-combos/">
<img class="cat-background-img" src="//files.sysers.com/cp/upload/vzcpr/editor/full/cat-background-pink.jpg">
<div class="cat-title-container">
<p class="cat-title">Combo Houses</p>
</div>
</a>
</div>
<div class="cat-item">
<img class="cat-item-img bounce-house" src="//files.sysers.com/cp/upload/vzcpr/editor/full/castle-no-background.png">
<img class="cat-background-img " src="//files.sysers.com/cp/upload/vzcpr/editor/full/cat-background-blue.jpg">
<div class="cat-title-container">
<p class="cat-title">Bounce Houses</p>
</div>
</div>
</div>
</div>
https://jsfiddle.net/61Lh3cyx/
To stop the 'top' of the imgs being part of the linking you could move the anchor element so it is not the parent of either img or the associated text. Move it to just below the text element and make it position absolute, the same height and width as the item and background color transparent.
That way the sticking out bit of the image does not get included, but the whole of the rest of the item is covered so you don't get a gap where the img is.
img {
max-width: 100%;
}
.cat-item-container {
display: flex;
flex-wrap: wrap;
padding-top: 50px;
}
.category-heading {
width: 100%;
text-align: center;
}
.cat-item {
width: 44%;
margin: 5% 3%;
position: relative;
}
.cat-background-img {
position: relative;
border-radius: 20px;
}
.cat-background-orange {
filter: hue-rotate(74deg);
}
.cat-item a {
position: absolute;
background-color: transparent;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 99999;
}
.cat-item-img {
position: absolute;
z-index: 999;
bottom: 50%;
width: 70%;
}
.cat-title-container {
position: absolute;
z-index: 9999;
bottom: 20%;
left: 5%;
}
.cat-title {
color: white;
font-weight: 600;
font-size: 4vw;
text-shadow: 0px 0px 7px #3e3e3e;
margin: 0;
}
.cat-item a {
display: block;
}
#media screen and (min-width: 1200px) {
.cat-title {
font-size: 48px;
}
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<div class="shop-by-category container">
<div class="category-heading">
Shop by Category
</div>
<div class="cat-item-container">
<div class="cat-item">
<img class="cat-item-img water-slide" src="//files.sysers.com/cp/upload/vzcpr/editor/full/blue-marble-water-slide.png">
<img class="cat-background-img cat-background-orange" src="//files.sysers.com/cp/upload/vzcpr/editor/full/cat-background-orange.jpg">
<div class="cat-title-container">
<p class="cat-title">Water Slides</p>
</div>
</div>
<div class="cat-item">
<img class="cat-item-img combo-house" src="//files.sysers.com/cp/upload/vzcpr/editor/full/Tiki-bounce-combo.png">
<img class="cat-background-img" src="//files.sysers.com/cp/upload/vzcpr/editor/full/cat-background-pink.jpg">
<div class="cat-title-container">
<p class="cat-title">Combo Houses</p>
</div>
<a href="/category/bounce-and-slide-combos/">
</a>
</div>
<div class="cat-item">
<img class="cat-item-img bounce-house" src="//files.sysers.com/cp/upload/vzcpr/editor/full/castle-no-background.png">
<img class="cat-background-img " src="//files.sysers.com/cp/upload/vzcpr/editor/full/cat-background-blue.jpg">
<div class="cat-title-container">
<p class="cat-title">Bounce Houses</p>
</div>
</div>
</div>
</div>

How to display part of the product image over div with gray background color?

I'm trying to design product details and one of the requirements is to design product image like this
https://imgur.com/Q8psgf7
<div class="button-wrap divide-md">
<div class="row">
<div class="col-sm-12 col-xs-12">
<a href="{{ route('products') }}" class="productCategories radio-label" id="city1-button">
<label class="button-label #if($productCat == 0) chosen_productCategory #endif" for="product1-button">
<h1>{{ trans("public.allProducts") }}</h1>
</label>
</a>
</div>
</div>
#foreach ($products_cats as $product_cat)
<div class="row">
<div class="col-sm-12 col-xs-12">
<a href="{{ route('products_cat', $product_cat->id) }}" class="productCategories radio-label" id="city1-button">
<label class="button-label #if($productCat == $product_cat->id) chosen_productCategory #endif" for="product1-button">
<h1>{{ $product_cat->name }}</h1>
</label>
</a>
</div>
</div>
#endforeach
</div>
I tried using css like :
postion :relative
z-index ....etc
but couldn't make it.
No need for extra markup, you can use pseudo elements for this:
.image-wrap {
margin: 100px;
box-shadow: -10px 10px 10px rgba(0, 0, 0, 0.3);
max-width: 200px;
position: relative;
}
.image-wrap:before {
content: '';
display: block;
position: absolute;
top: -10%;
left: -10%;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .4);
z-index: -1;
}
img {
display: block;
width: 100%;
height: auto;
}
<div class="image-wrap">
<img src="https://via.placeholder.com/200">
</div>
And using percentages for the top and left values of the :before makes it so the background box always stays relative to the size of the image if it gets smaller or larger due to responsive CSS.
From image attached it seems you want something like following.
.parent {
position: relative;
margin: 50px auto;
}
.parent div {
width: 100px;
height: 100px;
border: 1px solid #e1e1e1;
}
div.first {
background: grey;
}
div.second {
background-color: red;
position: absolute;
top: 20px;
left: 20px;
z-index: 3;
box-shadow: 0 4px 16px #333333;
}
<div class="parent">
<div class='first'/>
<div class="second"/>
</div>

Css, circles animation how to have them growing on hover and staying on the same line

I've 2 problems with the following snippet, I would like that on hover all the circles stay on the same line, they are "simply" pushed on the side.
But I'm struggling, it only seems they are going to the bottom when one of the circle is scaling..
Then, I'm trying to have them as close as possible, maybe because it's not aline, but they don't stick together on resize. And the text move too far away :O
I've seen the scaling option but I can't make it work here. So I'm only using the font-size.
I'm really not good with animations, if someone could give me clues or help me with that I would be grateful!
.bubble {
display: inline-block;
position: relative;
margin-right: -17px;
}
.bubble p {
font-size: 12px;
text-align: center;
color: rgba(100, 110, 115, 0.6);
}
.circle:before {
content: ' \25CF';
font-size: 80px;
transition: font 0.5s ease;
transform-origin: 0 0
}
.label-top {
position: absolute;
top: 10px;
left: 0;
right: 0;
}
.label-bottom {
position: absolute;
bottom: 3px;
left: 0;
right: 0;
}
.circle.blue:before {
color: #306BCE;
}
.circle.azure:before {
color: #05CDF9;
}
.circle.yellow:before {
color: #EEFB11;
}
.circle.red:before {
color: red;
}
.circle.bordeau:before {
color: #C90035;
}
.circle.purple:before {
color: #832A50;
}
.circle.brown:before {
color: #6C000C;
}
.circle:hover:before {
font-size: 200px;
}
<div>
<div class="bubble">
<span class="circle blue"></span>
<p class="label-bottom">Honesty</p>
</div>
<div class="bubble">
<p class="label-top">Confidence</p>
<span class="circle azure"></span>
</div>
<div class="bubble">
<span class="circle yellow"></span>
<p class="label-bottom">Curiosity</p>
</div>
<div class="bubble">
<p class="label-top">Passion</p>
<span class="circle red"></span>
</div>
<div class="bubble">
<span class="circle bordeau"></span>
<p class="label-bottom">Judging</p>
</div>
<div class="bubble">
<p class="label-top">Disagree</p>
<span class="circle purple"></span>
</div>
<div class="bubble">
<span class="circle brown"></span>
<p class="label-bottom">Nervousness</p>
</div>
</div>
As what #CBroe has pointed out, you are using a font glyph as the circle. By changing its font size, you are changing the line-height and that will mess up the vertical positioning of all elements in the row. The trick is to use pseudo-elements to create the circles instead, and position the circles absolutely. Once that is done, you can use transform: scale(...) to scale up the circles, without affecting the layout of surrounding elements.
I have also made some changes to your code:
Using display: flex to align your bubble elements. You may also use float: left on the bubble elements, but flexbox is quite widely supported today.
Do not set the transform origin, because it defaults to center center anyway :)
.bubble-wrapper {
display: flex;
}
.bubble {
position: relative;
width: 40px;
height: 90px;
}
.bubble p {
font-size: 12px;
text-align: center;
color: rgba(100, 110, 115, 0.6);
}
.circle {
display: block;
width: 40px;
height: 40px;
}
.circle:before {
display: block;
width: 40px;
height: 40px;
border-radius: 50%;
content: ' ';
transition: all 0.5s ease;
position: absolute;
top: 25px;
}
.label-top {
position: absolute;
top: 0px;
left: 0;
right: 0;
}
.label-bottom {
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
.circle.blue:before {
background-color: #306BCE;
}
.circle.azure:before {
background-color: #05CDF9;
}
.circle.yellow:before {
background-color: #EEFB11;
}
.circle.red:before {
background-color: red;
}
.circle.bordeau:before {
background-color: #C90035;
}
.circle.purple:before {
background-color: #832A50;
}
.circle.brown:before {
background-color: #6C000C;
}
.circle:hover:before {
transform: scale(2.5);
}
<div class="bubble-wrapper">
<div class="bubble">
<span class="circle blue"></span>
<p class="label-bottom">Honesty</p>
</div>
<div class="bubble">
<p class="label-top">Confidence</p>
<span class="circle azure"></span>
</div>
<div class="bubble">
<span class="circle yellow"></span>
<p class="label-bottom">Curiosity</p>
</div>
<div class="bubble">
<p class="label-top">Passion</p>
<span class="circle red"></span>
</div>
<div class="bubble">
<span class="circle bordeau"></span>
<p class="label-bottom">Judging</p>
</div>
<div class="bubble">
<p class="label-top">Disagree</p>
<span class="circle purple"></span>
</div>
<div class="bubble">
<span class="circle brown"></span>
<p class="label-bottom">Nervousness</p>
</div>
</div>
Update: If you want the width of the element to expand on hover, that is also possible. However, I also suggest that you can simplify your markup: basically we can make do without the circle div:
.bubble-wrapper {
display: flex;
}
.bubble {
position: relative;
width: 40px;
height: 90px;
transition: all 0.5s ease;
}
.bubble p {
font-size: 12px;
text-align: center;
color: rgba(100, 110, 115, 0.6);
}
.bubble:before {
display: block;
width: 40px;
height: 40px;
border-radius: 50%;
content: ' ';
transition: all 0.5s ease;
position: absolute;
top: 25px;
left: 50%;
transform: translateX(-50%);
}
.label-top {
position: absolute;
top: 0px;
left: 0;
right: 0;
}
.label-bottom {
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
.bubble.blue:before {
background-color: #306BCE;
}
.bubble.azure:before {
background-color: #05CDF9;
}
.bubble.yellow:before {
background-color: #EEFB11;
}
.bubble.red:before {
background-color: red;
}
.bubble.bordeau:before {
background-color: #C90035;
}
.bubble.purple:before {
background-color: #832A50;
}
.bubble.brown:before {
background-color: #6C000C;
}
.bubble:hover {
width: calc(40px * 2.5);
}
.bubble:hover:before {
transform: translateX(-50%) scale(2.5);
}
<div class="bubble-wrapper">
<div class="bubble blue">
<p class="label-bottom">Honesty</p>
</div>
<div class="bubble azure">
<p class="label-top">Confidence</p>
</div>
<div class="bubble yellow">
<p class="label-bottom">Curiosity</p>
</div>
<div class="bubble red">
<p class="label-top">Passion</p>
</div>
<div class="bubble bordeau">
<p class="label-bottom">Judging</p>
</div>
<div class="bubble purple">
<p class="label-top">Disagree</p>
</div>
<div class="bubble brown">
<p class="label-bottom">Nervousness</p>
</div>
</div>
I've used #Terry's excellent answer as the base to mine.
The main difference is that you don't need the pseudo elements. Just transform: scale() (transforms don't effect the layout) the hovered elements, and give it z-index: 1 if you want to bring them to the top.
.bubble-wrapper {
display: flex;
}
.bubble {
position: relative;
width: 40px;
height: 90px;
}
.bubble p {
font-size: 12px;
text-align: center;
color: rgba(100, 110, 115, 0.6);
}
.circle {
display: block;
position: relative;
width: 40x;
height: 40px;
border-radius: 50%;
content: ' ';
transition: all 0.5s ease;
}
.label-top {
position: absolute;
top: -40px;
left: 0;
right: 0;
}
.label-bottom {
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
.circle.blue {
background-color: #306BCE;
}
.circle.azure {
background-color: #05CDF9;
}
.circle.yellow {
background-color: #EEFB11;
}
.circle.red {
background-color: red;
}
.circle.bordeau {
background-color: #C90035;
}
.circle.purple {
background-color: #832A50;
}
.circle.brown {
background-color: #6C000C;
}
.circle:hover {
z-index: 1;
transform: scale(2.5);
}
body {
padding: 40px;
}
<div class="bubble-wrapper">
<div class="bubble">
<span class="circle blue"></span>
<p class="label-bottom">Honesty</p>
</div>
<div class="bubble">
<p class="label-top">Confidence</p>
<span class="circle azure"></span>
</div>
<div class="bubble">
<span class="circle yellow"></span>
<p class="label-bottom">Curiosity</p>
</div>
<div class="bubble">
<p class="label-top">Passion</p>
<span class="circle red"></span>
</div>
<div class="bubble">
<span class="circle bordeau"></span>
<p class="label-bottom">Judging</p>
</div>
<div class="bubble">
<p class="label-top">Disagree</p>
<span class="circle purple"></span>
</div>
<div class="bubble">
<span class="circle brown"></span>
<p class="label-bottom">Nervousness</p>
</div>
</div>
.bubble {
display: inline-block;
position: relative;
/* margin-right: -17px; */
vertical-align: middle;
}
.circle:hover:before {
/* font-size: 200px; */
width: 100px;
height: 100px;
}
.circle.blue:before {
background: #306BCE;
/* width: 50px; */
/* height: 50px; */
/* display: block; */
}
.circle:before {
content: '';
font-size: 80px;
transition: font 0.5s ease;
transform-origin: 0 0;
width: 50px;
height: 50px;
display: block;
border-radius: 50%;
background: red;
}

Text over image - responsive

this is my first question soo... i have to do someting like this:
but i search a lot and nothing work for me, i had something like this in my html and css
.thumbnail {
position: relative;
margin-bottom: 0;
border: 0;
border-color: transparent;
}
.caption {
position: absolute;
top: 40%;
left: 0;
width: 100%;
}
<div id="box-search">
<div class="thumbnail text-center">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Granola03242006.JPG/280px-Granola03242006.JPG" alt="">
<div class="caption">
<p>contacto#windberg.cl</p>
<p>+56983874071 | +56228231294</p>
<p>El Aguilucho 3174, Providencia, Región Metropolitana</p>
</div>
</div>
</div>
that work, but when i use the responsive mode from chrome, the text leave the image
(sorry for my english, i speak spanish)
img {
display: block;
}
.thumbnail {
position: relative;
display: inline-block;
}
.caption {
position: absolute;
top: 50%;
left: 50%;
transform: translate( -50%, -50% );
text-align: center;
color: white;
font-weight: bold;
}
<div id="box-search">
<div class="thumbnail">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Granola03242006.JPG/280px-Granola03242006.JPG" alt="">
<div class="caption">
<p>contacto#windberg.cl</p>
<p>+56983874071 | +56228231294</p>
<p>El Aguilucho 3174, Providencia, Región Metropolitana</p>
</div>
</div>
</div>