Jade: Change active menu item in parent template

parent.jade doctype 5 html block link -var selected = ‘home’; //default -var menu = { ‘home’: ‘/home’, ‘blog’: ‘/blog’, ‘contact’: ‘/contact’ }; body nav ul each val, key in menu li if selected === key a.selected(href=val, title=key)= key else a(href=val, title=key)= key child.jade extends parent block link -var selected = ‘blog’;

How can I position an icon over an image or video?

You need a relative container around your image and then you set your icon to be position: absolute. .container { position: relative; } .container img { display: block; } .container .fa-download { position: absolute; bottom:0; left:0; } <link href=”https://use.fontawesome.com/releases/v5.7.1/css/all.css” rel=”stylesheet”/> <div class=”container”> <img src=”https://placekitten.com/300/300″> <a href=”https://stackoverflow.com/questions/54508374/dog.png” download=”new-filename”><i class=”fas fa-download”></i></a> </div> The reason why you need … Read more

XPath to Parse “SRC” from IMG tag?

You are so close to answering this yourself that I am somewhat reluctant to answer it for you. However, the following XPath should provide what you want (provided the source is XHTML, of course). //img[@class=”photo-large”]/@src For further tips, check out W3 Schools. They have excellent tutorials on such things and a great reference too.

Icon in bootstrap 4 inside the input

here is the solution span{ position: absolute; margin-left: 5px; height: 25px; display: flex; align-items: center; } input{ padding-left: 25px; height: 20px; } <link href=”https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css” rel=”stylesheet”/> <div class=”input-group”> <span> <i class=”fa fa-user-circle-o” aria-hidden=”true”></i> </span> <input type=”text” class=”form-control” placeholder=”Username” /> </div> here is the working fiddle