I am trying to get an image to display an image using css background image, but I am not able to get the image to render.
HTML:
<div class="row">
<div class="col-lg-12">
<div class="row" class="rmh-logo">
<div class="col-lg-9" align="left">
<h1><?php echo "{$pageHeading}"; ?></h1>
</div>
**<div class="col-lg-3" align="right" class="rmh-logo">
<!--<img src ="/rmhcOmahaTeam/assets/img/logo.png" width ="200" height ="100"> -->
</div>**
</div>
<ol class="breadcrumb">
<li>
<?php echo "{$navLinks}"; ?>
</li>
</ol>
</div>
</div>'
CSS:
.rmh-logo {
background-image: url("rmhOmahaTeam/assets/img/logo.png");
background-repeat: no-repeat;
background-position: top right;
width:200px;
height:100px;
}
pavel
27.3k11 gold badges47 silver badges63 bronze badges
-
check your image urlVitorino fernandes– Vitorino fernandes2014年11月16日 08:08:56 +00:00Commented Nov 16, 2014 at 8:08
1 Answer 1
In HTML you have a slash linking to the root /rmhOmahaTeam/assets/img/logo.png, in CSS not.
I expected your CSS file is in any directory and not in the website root.
background-image: url("/rmhOmahaTeam/assets/img/logo.png");
^
answered Nov 16, 2014 at 8:08
pavel
27.3k11 gold badges47 silver badges63 bronze badges
Sign up to request clarification or add additional context in comments.
1 Comment
Mike
Thanks for the help! I was able to resolve the issue.
lang-html