Reputation: 31
Here is the CSS and below it is the html code. Not sure why this setup is not working. Any help would be appreciated.
div.logo img {
height: 100px;
width: 200;
position: absolute;
display: table-cell;
}
<div class="a container-fluid">
<div class="row">
<div class="col-md-12">
<div class="logo"><img src="logo.png">
Upvotes: 1
Views: 204
Reputation: 7
Try giving position: relative to the parent container, and give display:block to the div 'logo', maybe it'll work for you then. Although same piece of code is working for me in CodePen, or attach fiddle along with this for better clarity.
Upvotes: 1
Reputation: 5636
Try this:
div.logo img {
height: 100px;
width: 200;
position: absolute;
display: block;
border:1px solid red;
}
<div class="a container-fluid">
<div class="row">
<div class="col-md-12">
<div class="logo">
<img src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" />
</div>
</div>
</div>
</div>
https://jsfiddle.net/42eot71s/
Upvotes: 0