Zeshan Merchant
Zeshan Merchant
KPCKevin Powell - Community
Created by Faker on 11/7/2024 in #front-end
How to make varying labels width and input-fields take same horizontal space
I always notice this and I really appreciate your dedication to the server and the rules. ❤️🙌
74 replies
KPCKevin Powell - Community
Created by Faker on 11/7/2024 in #front-end
How to make varying labels width and input-fields take same horizontal space
idk, it was in his code pen
74 replies
KPCKevin Powell - Community
Created by Faker on 11/7/2024 in #front-end
How to make varying labels width and input-fields take same horizontal space
yeah this is also cool and better approach
74 replies
KPCKevin Powell - Community
Created by Faker on 11/7/2024 in #front-end
How to make varying labels width and input-fields take same horizontal space
I hope there are no issues with that
74 replies
KPCKevin Powell - Community
Created by Faker on 11/7/2024 in #front-end
How to make varying labels width and input-fields take same horizontal space
actually the first one is from my work PC, and second one is from my mobile. I saw the post in my mobile. First one I added for any help i might need while I am at work.
74 replies
KPCKevin Powell - Community
Created by Faker on 11/7/2024 in #front-end
How to make varying labels width and input-fields take same horizontal space
which one?
74 replies
KPCKevin Powell - Community
Created by Faker on 11/7/2024 in #front-end
How to make varying labels width and input-fields take same horizontal space
74 replies
KPCKevin Powell - Community
Created by Faker on 11/7/2024 in #front-end
How to make varying labels width and input-fields take same horizontal space
you can adjust the width as you want
74 replies
KPCKevin Powell - Community
Created by Faker on 11/7/2024 in #front-end
How to make varying labels width and input-fields take same horizontal space
My suggestion would be use grids with 1 parent container, you can use form instead of div for better semantics
<body>
<h1>Learning promises, async and await</h1>
<div class="wrapper">
<label for="name">Name:</label>
<input type="text" id="name" name="name" /> <br/>
<label for="delay">Something very long:</label>
<input type="text" id="delay" name="delay" /><br/>
<button type="submit">Set alarm</button>
</div>
</body>
<body>
<h1>Learning promises, async and await</h1>
<div class="wrapper">
<label for="name">Name:</label>
<input type="text" id="name" name="name" /> <br/>
<label for="delay">Something very long:</label>
<input type="text" id="delay" name="delay" /><br/>
<button type="submit">Set alarm</button>
</div>
</body>
*,
*::after,
*::before {
box-sizing: border-box;
margin: 0;
}

body {
min-height: 100vh;
min-height: 100svh;
}

h1 {
margin-bottom: 1em;
}

input {
margin-bottom: 2em ;
}

.wrapper{
display : grid;
grid-template-columns : repeat(2,1fr);
width: 350px;
}

.wrapper label{
grid-column : 1/2;
}

.wrapper button{
grid-column : 1/3;
justify-self : center;
}
*,
*::after,
*::before {
box-sizing: border-box;
margin: 0;
}

body {
min-height: 100vh;
min-height: 100svh;
}

h1 {
margin-bottom: 1em;
}

input {
margin-bottom: 2em ;
}

.wrapper{
display : grid;
grid-template-columns : repeat(2,1fr);
width: 350px;
}

.wrapper label{
grid-column : 1/2;
}

.wrapper button{
grid-column : 1/3;
justify-self : center;
}
74 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/26/2024 in #front-end
Need help with this bugged dropdown
if you dont see a class in css, it means it is just styling class
9 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/26/2024 in #front-end
Need help with this bugged dropdown
f means flex row and f-c is flex col
9 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/26/2024 in #front-end
Need help with this bugged dropdown
const hamburger = document.querySelector(".hamburger");
const navMenu = document.getElementById("navbar__items");
const ddNavLinks = document.querySelectorAll(".dd__navLink");

hamburger.addEventListener("click", () => {
hamburger.classList.toggle("active");
navMenu.classList.toggle("active");
})
const hamburger = document.querySelector(".hamburger");
const navMenu = document.getElementById("navbar__items");
const ddNavLinks = document.querySelectorAll(".dd__navLink");

hamburger.addEventListener("click", () => {
hamburger.classList.toggle("active");
navMenu.classList.toggle("active");
})
9 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/26/2024 in #front-end
Need help with this bugged dropdown
@media (max-width: 1100px) {
/* NAVBAR START */
.hamburger {
display: block;
}

.navbar {
padding: 0 3em;
}

.navbar__items {
flex-direction: column;
justify-content: start;
position: fixed;
top: calc(12vh);
width: 50%;
height: 100vh;
right: -1000px;
background-color: var(--primary);
text-align: center;
padding: 20px 0;
margin: 0;
gap: 2em;
transition: all ease 0.5s;
}

.navbar__item {
margin: 10px 0;
}

.navbar__items ul{
position: static;
background: var(--primary--light);
padding-top: 0;
margin-top: 14px;
}

.dd__navLink,.dd__links{
position: static;
}

.dd__navLink:hover .dd__links{
border: 1px solid red;
}

/* NAVBAR END */
@media (max-width: 1100px) {
/* NAVBAR START */
.hamburger {
display: block;
}

.navbar {
padding: 0 3em;
}

.navbar__items {
flex-direction: column;
justify-content: start;
position: fixed;
top: calc(12vh);
width: 50%;
height: 100vh;
right: -1000px;
background-color: var(--primary);
text-align: center;
padding: 20px 0;
margin: 0;
gap: 2em;
transition: all ease 0.5s;
}

.navbar__item {
margin: 10px 0;
}

.navbar__items ul{
position: static;
background: var(--primary--light);
padding-top: 0;
margin-top: 14px;
}

.dd__navLink,.dd__links{
position: static;
}

.dd__navLink:hover .dd__links{
border: 1px solid red;
}

/* NAVBAR END */
9 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/26/2024 in #front-end
Need help with this bugged dropdown
.dd__links {
position: absolute;
width: max-content;
background: var(--primary);
padding-top: 0;
color: var(--secondary);
align-items: stretch;
left: -55px;
height: 0;
margin-top: 0;
padding-top: 10px;
display: none;
transition: opacity var(--general-transition), visibility var(--general-transition);
}

.dd__links{
display: flex;
flex-direction: column;
position: absolute;
top: 20px;
display: none;
}

.dd__navLink:hover .dd__links {
display: flex;
height: auto;
/* padding-top: 2em; */
}


.dd__link {
color: var(--secondary);
font-size: var(--fs--18-14);
padding: 1em 2em;
width: 100%;
display: block;
transition: var(--general-transition);
}

.dd__link:hover {
background: var(--primary--dark);
}


.hamburger {
display: none;
}

.bar {
display: block;
width: 25px;
height: 3px;
border-radius: 1px;
margin: 5px auto;
transition: var(--general-transition);
background-color: var(--secondary);
}

.bar:nth-child(2) {
width: 30px;
margin-right: 5px;
}

/* Hamburger Menu Animation */
.hamburger.active .bar:nth-child(2) {
opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
transform: translateY(-8px) rotate(-45deg);
}

/* NAVBAR END */
.dd__links {
position: absolute;
width: max-content;
background: var(--primary);
padding-top: 0;
color: var(--secondary);
align-items: stretch;
left: -55px;
height: 0;
margin-top: 0;
padding-top: 10px;
display: none;
transition: opacity var(--general-transition), visibility var(--general-transition);
}

.dd__links{
display: flex;
flex-direction: column;
position: absolute;
top: 20px;
display: none;
}

.dd__navLink:hover .dd__links {
display: flex;
height: auto;
/* padding-top: 2em; */
}


.dd__link {
color: var(--secondary);
font-size: var(--fs--18-14);
padding: 1em 2em;
width: 100%;
display: block;
transition: var(--general-transition);
}

.dd__link:hover {
background: var(--primary--dark);
}


.hamburger {
display: none;
}

.bar {
display: block;
width: 25px;
height: 3px;
border-radius: 1px;
margin: 5px auto;
transition: var(--general-transition);
background-color: var(--secondary);
}

.bar:nth-child(2) {
width: 30px;
margin-right: 5px;
}

/* Hamburger Menu Animation */
.hamburger.active .bar:nth-child(2) {
opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
transform: translateY(-8px) rotate(-45deg);
}

/* NAVBAR END */
9 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/26/2024 in #front-end
Need help with this bugged dropdown
/* NAVBAR START */
.navbar {
height: 12vh;
width: 100vw;
background-color: var(--primary);
padding: 0;
padding-left: clamp(1.5em, calc(1.5em + ((1vw - 0.87625em) * 7.722)), 4em);
padding-right: clamp(1.5em, calc(1.5em + ((1vw - 0.87625em) * 7.722)), 4em);
position: fixed;
justify-content: space-between;
top: 0;
gap: 5em;
border-bottom: 3px solid var(--accent);
z-index: 999;

}

.logo {
font-weight: 600;
color: var(--accent);
letter-spacing: 2px;
font-size: clamp(1.375em, calc(1.375em + ((1vw - 0.2em) * 1)), 2.375em);
width: fit-content;
}

.navbar__items {
justify-content: space-between;
letter-spacing: 2px;
font-weight: 500;
gap: 1.4em;
flex: 1;
color: var(--secondary);
/* overflow-y: scroll; */
}

.navbar__items.active {
right: 0;
}

.navbar__link {
color: var(--secondary);
position: relative;
gap: 7px;
text-wrap: nowrap;
font-size: var(--fs--18-14);
/* cursor: none !important; */
cursor: default;
}

.dd__navLink {
display: flex;
position: relative;
}

.online_bkg {
font-size: var(--fs--18-14);
}

.dd__navLink img {
transition: var(--general-transition);
}

.dd__navLink img.active {
transform: rotate(180deg);
}
/* NAVBAR START */
.navbar {
height: 12vh;
width: 100vw;
background-color: var(--primary);
padding: 0;
padding-left: clamp(1.5em, calc(1.5em + ((1vw - 0.87625em) * 7.722)), 4em);
padding-right: clamp(1.5em, calc(1.5em + ((1vw - 0.87625em) * 7.722)), 4em);
position: fixed;
justify-content: space-between;
top: 0;
gap: 5em;
border-bottom: 3px solid var(--accent);
z-index: 999;

}

.logo {
font-weight: 600;
color: var(--accent);
letter-spacing: 2px;
font-size: clamp(1.375em, calc(1.375em + ((1vw - 0.2em) * 1)), 2.375em);
width: fit-content;
}

.navbar__items {
justify-content: space-between;
letter-spacing: 2px;
font-weight: 500;
gap: 1.4em;
flex: 1;
color: var(--secondary);
/* overflow-y: scroll; */
}

.navbar__items.active {
right: 0;
}

.navbar__link {
color: var(--secondary);
position: relative;
gap: 7px;
text-wrap: nowrap;
font-size: var(--fs--18-14);
/* cursor: none !important; */
cursor: default;
}

.dd__navLink {
display: flex;
position: relative;
}

.online_bkg {
font-size: var(--fs--18-14);
}

.dd__navLink img {
transition: var(--general-transition);
}

.dd__navLink img.active {
transform: rotate(180deg);
}
9 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/26/2024 in #front-end
Need help with this bugged dropdown
9 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/20/2024 in #front-end
How to achieve this element/design
Thanks mate
7 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/20/2024 in #front-end
How to achieve this element/design
Its just I used a bit of JS for animation and Data handling
7 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/20/2024 in #front-end
How to achieve this element/design
It is dynamic and right now, since i am not connected to backend, i made a dummy json with a statusValue boolean, based on which each circle is connected
7 replies
KPCKevin Powell - Community
Created by Zeshan Merchant on 9/20/2024 in #front-end
How to achieve this element/design
@Chris You wont believe it but I actually had the same thought process and I did implement it the same way u mentioned
7 replies