Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code organised #3

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.Title {
margin-bottom: 10px;
text-align: center;
width: 210px;
color: rgb(238, 20, 20);
border: solid black 2px;
}

input[type="button"] {
background-color: green;
color: rgba(245, 241, 23, 0.966);
border: solid black 2px;
width: 100%
}

input[type="text"] {
background-color: white;
border: solid black 2px;
width: 100%
}

.m_body {
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-image: url("calc.jpeg");
background-position: center;
background-repeat: no-repeat;

}

input:hover {
background-color: white;
color: black;
}

table {
height: 30%;
border-radius: 10px;
border: 5px solid black;
}
79 changes: 3 additions & 76 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,81 +1,9 @@
<html>

<head>
<script>
function display(val) {
document.getElementById("result").value += val;
}
function calcculate() {
var str = document.getElementById("result").value;
var ans = eval(str);
document.getElementById("result").value = ans;
}
function clear_screen() {
document.getElementById("result").value = "";
}
</script>

<!---style starts here..........-->
<style>
body{
font-size: 2rem;
}
td{
height: 2rem;
width: 2rem;
}
td > input{

padding: 50px;
}
.Title {
margin-bottom: 10px;
text-align: center;
width: 30vw;
color: rgb(238, 20, 20);
border: solid black 2px;
}

input[type="button"] {
background-color: green;
color: rgba(245, 241, 23, 0.966);
border: solid black 2px;
width: 100%
}

input[type="text"] {
background-color: white;
border: solid black 2px;
width: 100%
}

.m_body {
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-position: center;
background-repeat: no-repeat;

}

input:hover {
background-color: white;
color: black;
}

table {
/* height: 70%;
width: 70%; */
border-radius: 10px;
border: 5px solid black;
}
#result{
font-size: 2rem;
}
</style>

<script src="index.js"></script>
<link rel="stylesheet" href="index.css" type="text/css">

</head>

Expand Down Expand Up @@ -116,5 +44,4 @@
</table>
</div>
</body>

</html>
</html>
11 changes: 11 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function display(val) {
document.getElementById("result").value += val;
}
function calcculate() {
var str = document.getElementById("result").value;
var ans = eval(str);
document.getElementById("result").value = ans;
}
function clear_screen() {
document.getElementById("result").value = "";
}