Muneeba Anwar Muneeba Anwar - 1 month ago 7
HTML Question

Link not working Inside Div

I am a beginner and have a really stupid question to ask. I created these two divs and have linked two pages with them. Now the problem is, the 2nd link (Sign In) works but the first one won't.

Here's the HTML:

<div id="intro-img" class="animated fadeIn"> <a href="signUp.html" class="btn">Sign Up</a>

<div class="wallpaper" alt="wireframe"></div>

<div id="intro-img" class="animated fadeIn"> <a href="signIn.html"class="btn1">Sign In</a>

<div class="wallpaper1" alt="wireframe"></div>


And here's the relevant CSS:

#intro .btn {
position: absolute;
width: 200px;
height: 70px;
padding: 0;
top: 150px;
z-index: 40;

}

#intro .btn1 {
position: absolute;
width: 200px;
height: 70px;
padding: 0;
top: 280px;
left:5px;
z-index: 50;

}

Answer

You forget to close the div or maybe you don't check the correct name singUp.html

<div id="intro-img" class="animated fadeIn"> <a href="signUp.html" class="btn">Sign Up</a><div id="intro-img" class="animated fadeIn"> <a href="signUp.html" class="btn">Sign Up</a> </div>