Reputation: 1
I need a little help... I can't understand why my links on my images won't work... I have been searching for so long time, but i can't find the reason why it won't work! Please help me... Thank you so much!
.container {
width: 80%;
max-width: 1240px; /*maks bredde*/
min-height: 500px;
margin: 0 auto; /*midtstiller container og setter den øverst*/
}
header {
background-color: #292929;
width: 80%;
position: fixed;
margin-top: 5px;
}
header img{
width: 8%;
float: left;
margin-left: 20px;
margin-top: 15px;
margin-bottom: 15px;
height: 4%;
}
#navlogoer {
width: 40%;
margin-left: 75%;
margin-top: -65px;
}
<div class="container">
<header>
<a href="index.html">
<img src="images/Opheimlogooransje.png" alt="opheim logo"/></a>
<nav id="navlogoer">
<a href="https://itunes.apple.com/no/album/summerbeach-feat.-tiril-sundf/id981300584?i=981300598&uo=6&at=&ct=">
<img src="images/ITuneslogocroped.png" alt="Itunes logo"/></a>
<a href="https://open.spotify.com/artist/0VaCp9BRPhNezjr5Z3va5l">
<img src="images/Spotifylogocroped.png" alt="Spotify logo"/></a>
<a href="https://www.youtube.com/channel/UCohhdrYONwzIeMW61Ibgszw/feed">
<img src="images/youtubelogocroped.png" alt="Youtube logo"/></a>
<a href="https://soundcloud.com/jesperopheim">
<img src="images/Soundcloudlogocroped.png" alt="Soundcloud"/></a>
<a href="https://no.7digital.com/artist/opheim/">
<img src="images/7digitallogocroped.png" alt="7digital logo"/></a>
</nav>
</header>
</div>
Upvotes: 0
Views: 6423
Reputation: 1854
Your code works fine, I checked.
Here is sample DEMO
I just replaced images only.
So you check the location of your images.
<div class="container">
<header>
<a href="index.html">
<img src="http://s17.postimg.org/ahbud601n/klematis2.jpg" alt="opheim logo"/></a>
<nav id="navlogoer">
<a href="https://itunes.apple.com/no/album/summerbeach-feat.-tiril-sundf/id981300584?i=981300598&uo=6&at=&ct=">
<img src="images/ITuneslogocroped.png" alt="Itunes logo"/></a>
<a href="https://open.spotify.com/artist/0VaCp9BRPhNezjr5Z3va5l">
<img src="images/Spotifylogocroped.png" alt="Spotify logo"/></a>
<a href="https://www.youtube.com/channel/UCohhdrYONwzIeMW61Ibgszw/feed">
<img src="http://s17.postimg.org/ahbud601n/klematis2.jpg" alt="Youtube logo"/></a>
<a href="https://soundcloud.com/jesperopheim">
<img src="http://s17.postimg.org/ahbud601n/klematis2.jpg" alt="Soundcloud"/></a>
<a href="https://no.7digital.com/artist/opheim/">
<img src="http://s17.postimg.org/ahbud601n/klematis2.jpg" alt="7digital logo"/></a>
</nav>
</header>
</div>
</body>
</html>
Upvotes: 0
Reputation: 679
According to your question, all the links are working fine. Actually the correct syntax for making the images as links is as follows:
<pre><code><a href="#"><img src="" alt="" /></a></code></pre>
Upvotes: 1
Reputation: 1981
Hey you have done something wrong here
header img{
width: 8%;
float: left;
margin-left: 20px;
margin-top: 15px;
margin-bottom: 15px;
height: 4%;
}
Change it as
header a{
width: 8%;
float: left;
margin-left: 20px;
margin-top: 15px;
margin-bottom: 15px;
height: 4%;
display:block;
}
and
header img{
width: 100%;
}
Upvotes: 0