How to add banner image and text over it | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to add banner image and text over it

25th Mar 2017, 9:04 AM
vimal kumar karwa
vimal kumar karwa - avatar
6 Answers
+ 6
z-index css property
25th Mar 2017, 12:57 PM
Andre van Rensburg
Andre van Rensburg - avatar
+ 2
It would need some cssing .banner { background-image:url ('banner.png'); background-size:cover; } .header { padding:10px 0px 0px 20px; } Now, in <body> tag, use it <body> <div class='banner '> <div class='header> <h1> Page Header </h1> <p>Some text </p> </div> </body>
25th Mar 2017, 12:51 PM
เคฆเฅ‡เคตเฅ‡เค‚เคฆเฅเคฐ เคฎเคนเคพเคœเคจ (Devender)
เคฆเฅ‡เคตเฅ‡เค‚เคฆเฅเคฐ เคฎเคนเคพเคœเคจ (Devender) - avatar
+ 2
show image by img tag then show text by tag ex p or b then by z-index property for text and value great ex 1000 show text hover img and position property value relative and top and left property move text on img ex css code p{ position: relative; top: 20px; left: 200px; z-index: 1000; } good luck
25th Mar 2017, 3:49 PM
Hassan Papi
Hassan Papi - avatar
+ 1
@Devender Mahajan, you have lost one </div> ๐Ÿ˜‹
25th Mar 2017, 1:25 PM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
0
You can't, just create a banner with text already on it and then embed it wherever you want.
25th Mar 2017, 11:02 AM
Skybender
Skybender - avatar
0
Thanks @Yaroslav for pointing it out
25th Mar 2017, 1:49 PM
เคฆเฅ‡เคตเฅ‡เค‚เคฆเฅเคฐ เคฎเคนเคพเคœเคจ (Devender)
เคฆเฅ‡เคตเฅ‡เค‚เคฆเฅเคฐ เคฎเคนเคพเคœเคจ (Devender) - avatar