Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Commit a9759b1

Browse files
add 2 buttons onclick code in index.html page and also set position on an element on resume page
1 parent e71e0c2 commit a9759b1

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

MultiPage-Clone/css/resume.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ footer {
624624
}
625625

626626
#edu-txt {
627+
width: 760px;
627628
font-family: Poppins, sans-serif;
628629
font-size: 1.5rem;
629630
font-weight: bold;

MultiPage-Clone/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ <h1>Hello</h1>
6868
<span>Here's who I am & what I do</span>
6969
</div>
7070
<div class="btn">
71-
<button class="btn1">Resume</button>
72-
<button class="btn2">Projects</button>
71+
<button class="btn1" id="btn-resume" onclick="openPage('btn-resume')">Resume</button>
72+
<button class="btn2" id="btn-project" onclick="openPage('btn-project')">Projects</button>
7373
</div>
7474
<div class="para">
7575
<p>I'm a paragraph. Click here to add your own text and edit me. It’s easy. Just click “Edit Text” or double click me to

MultiPage-Clone/main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,11 @@ burgerr.addEventListener("click", () => {
1212
body.style.overflow = "auto";
1313
}
1414
});
15+
16+
function openPage(buttonId){
17+
if(buttonId === 'btn-resume'){
18+
window.location.href = "resume.html";
19+
}else if(buttonId === 'btn-project'){
20+
window.location.href ='project.html'
21+
}
22+
}

0 commit comments

Comments
 (0)