0

how do you write a paragraph over the image

21st Sep 2016, 4:08 PM
Morne de Klerk
7 Answers
+ 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>
21st Sep 2016, 9:07 PM
Jameyson Mac Donald
Jameyson Mac Donald - avatar
+ 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>
22nd Sep 2016, 12:11 PM
Goran Mitic
Goran Mitic - avatar
+ 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.
23rd Sep 2016, 2:24 PM
Baillie O'grady
Baillie O'grady - avatar
0
over its at the top of the image ?
21st Sep 2016, 4:43 PM
edward
edward - avatar
0
Hehe no sorry i wasn't thinking, i could just set a image as background
21st Sep 2016, 5:06 PM
Morne de Klerk
0
Ah in html colors you can to learn that ( my english is french sorry )😀<font> i think
21st Sep 2016, 5:09 PM
edward
edward - avatar
0
<p align="center">paragraph <br /> <img src="image.jpg" /></p>
21st Sep 2016, 7:10 PM
Stradivarius
Stradivarius - avatar