Images in both corners in header section | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Images in both corners in header section

i am learner. i want to put images in right and left corners of the header section and heading in center. pls help me regarding this. all r align

16th Apr 2017, 6:54 AM
Uppati Eeswar Rao
Uppati Eeswar Rao - avatar
1 Answer
+ 10
<!DOCTYPE html> <html> <head> <title>Page Title</title> <style> body { text-align:right; } img { background:orange; width:50px; height:75px; } header { display:inline-block; width:auto; text-align:center; border:1px solid red; } header img:first-child { float:left; } header img:last-child { float:right; } header span { line-height:75px; margin:0 1em; } </style> </head> <body> <header> <img> <span>Page Title</span> <img> </header> </body> </html> <!-- Something like that? Or do you mean having images set as css background of the 'header' element? -->
16th Apr 2017, 7:24 AM
visph
visph - avatar