1

I am having an issue getting a banner with clickable images to work properly. The banner seems to be fine, the images however, not so much. Take a look please! Thanks in advance!

HTML:

<div id="fixed" style="background-color: #000; height: 60px; width: 1920px;">
   <div>
     <img src="image_mini.png"/>
   </div>
</div>

CSS:

#fixed {
  position: fixed;
  left: 0px;
  padding: 0px;
  bottom:0px;
}
DaniP
  • 37,813
  • 8
  • 65
  • 74
  • First time using this website, and the HTML didn't go through all the way. –  Jun 20 '16 at 13:55
  • 1
    Exactly what is the problem with the imgs? which is the expected output? – DaniP Jun 20 '16 at 13:57
  • The image doesn't display, it instead shows a default "missing image" image, if that makes sense. As if it's not directed to the right location. –  Jun 20 '16 at 14:00
  • Then the problem is the path of the img or the ubication – DaniP Jun 20 '16 at 14:02
  • Okay, where exactly would I need to start the path? From C: or from the beginning of the folder? –  Jun 20 '16 at 14:03
  • The paths must be always relative to the file you are ... not absolute, please take a look at https://css-tricks.com/quick-reminder-about-file-paths/ – DaniP Jun 20 '16 at 14:05
  • Hey, it worked! Thank you very much! –  Jun 20 '16 at 14:08
  • Np glad to help U . – DaniP Jun 20 '16 at 14:09

1 Answers1

1

edit this code to what is your preferences , if you want the images clickable you need to make it into a link or button ; also very important make sure that the path of your image is correct , and adjust your width and height on the image tag.

<style>
#fixed {
  position: fixed;
  left: 0px;
  padding: 0px;
  bottom:0px;
}
</style>


<div id="fixed" style="background-color: #000; height: 60px; width: 1920px;">
   <div>
   <a href="home.php"><img src="image_mini.png" width="50" height="50"/></a>  
   </div>
</div>
Rico_93
  • 108
  • 1
  • 6