0
how do you write a paragraph over the image
7 ответов
+ 1
Just use Bootstrap and div tags like this.
<!-- Make sure you either have bootstrap or link to it in your document like this: -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<div class="container">
<div class="row">
<div class="col-md-6">
<img src="https://pixabay.com/static/uploads/photo/2015/09/02/13/02/mountain-range-918839_960_720.jpg" alt="test" class="img-responsive">
<div class="carousel-caption">
<h1>Example headline.</h1>
</div>
</div>
<div class="col-md-6">
<img src="https://pixabay.com/static/uploads/photo/2015/09/02/13/02/mountain-range-918839_960_720.jpg" alt="test" class="img-responsive">
<div class="carousel-caption">
<p>Example paragraph.</p>
</div>
</div>
</div>
</div>
+ 1
Try combination of html and css:
<div>
<img src="img.jpg">
<p>Some text</p>
</div>
<style>
div {
display: inline-block;
position: relative;
width: 300px;
height: 300px;
}
div img {
position: absolute;
z-index: 0;
}
div p {
position: absolute;
z-index: 1;
}
</style>
+ 1
Use the 'position' selector in css, for example:
Img {
position: relative;
}
p {
position: absolute ;
}
This will place the paragraph within the img container and you can position it wherever you'd like using the: top, right, left and bottom properties.
0
over its at the top of the image ?
0
Hehe no sorry i wasn't thinking, i could just set a image as background
0
Ah in html colors you can to learn that ( my english is french sorry )😀<font> i think
0
<p align="center">paragraph <br /> <img src="image.jpg" /></p>