White space

Hi! This is my first website and I have no idea why there is white space on the right. I tried to give HTML a 100% width, i tried overflow-x hidden and I even tried wacky stuff like negative margin right values but nothing works. My code is really long because of media queries, but I hope you'll be able to help '''@media (max-width: 420px) { .button-86{ transform: translate(50vw,97vw);
} #intern { height: 160vw } .p-line { transform: translate(0vw,32.5vw); overflow-x: hidden; } .intern-p { font-size: 5.5vw; width: 80vw; margin-top: 21vw } .intern-p-2 { margin-top: 45vw } #small-container-img-1,#small-container-img-2,#small-container-img-3 { width: 30vw; margin-top: 14% } #button { display: none ; }
53 Replies
ἔρως
ἔρως2mo ago
the body has a default margin of 8px
Mannix
Mannix2mo ago
maybe those translates are causing it??
ἔρως
ἔρως2mo ago
depending on the content of the element, it won't cause overflow but i'm guessing
ChairLizard
ChairLizard2mo ago
thank you so much for answering, even tho i provided limited code because of discord text restrictions, but unfortunately i already gave body a margin of 0
No description
ἔρως
ἔρως2mo ago
then can you grab everything and put it in a codepen or jsfiddle?
ChairLizard
ChairLizard2mo ago
ah, unfortunately im not familiar with Js, only been a month or two since ive picked up Html and Css
ἔρως
ἔρως2mo ago
what?
ChairLizard
ChairLizard2mo ago
is codepen or jsfiddle part of html and css?
ἔρως
ἔρως2mo ago
no, it's to show your code working
ChairLizard
ChairLizard2mo ago
oh, my bad, im unfamiliar with that can you explain it to me
ἔρως
ἔρως2mo ago
it's self explanatory, literally just go to the website and you will understand imediatelly
ChairLizard
ChairLizard2mo ago
i see gimme a few minutes and ill go check it out
ἔρως
ἔρως2mo ago
take your time
ChairLizard
ChairLizard2mo ago
i put it in
No description
ChairLizard
ChairLizard2mo ago
i actually already bought a hostinger sub for hosting the website, this is supposed to be a website for an NGO my friend made
ἔρως
ἔρως2mo ago
we need the link to see it running
ChairLizard
ChairLizard2mo ago
oh sure https://floralwhite-goldfinch-146588.hostingersite.com/ excuse the domain, havent bought it yet there are some errors with the media queries as well, apologies
ἔρως
ἔρως2mo ago
well, one thing you can do is to remove the width of the footer
Code-S ♛
Code-S ♛2mo ago
for padding:0 and margin : 0 use the universal tag *
ἔρως
ἔρως2mo ago
don't do that
Code-S ♛
Code-S ♛2mo ago
for future files you know
ἔρως
ἔρως2mo ago
also no that's a terrible idea
Code-S ♛
Code-S ♛2mo ago
why? everyone does that? how do you do 0 then?
ἔρως
ἔρως2mo ago
i use a proper css reset nuking margins and paddings is awful since you will have to put them back in anyways
Code-S ♛
Code-S ♛2mo ago
😑
ChairLizard
ChairLizard2mo ago
now that i think about it, that's a splendid idea ill remember that for the future, thanks!
ἔρως
ἔρως2mo ago
it's one of the things that's causing you overflow also, don't set an height on your footer either
ChairLizard
ChairLizard2mo ago
should i remove the headers width too? i see, i set it because some text was overflowing and i wanted to increase the footer height
ἔρως
ἔρως2mo ago
just remove the right padding
ChairLizard
ChairLizard2mo ago
right ill try and ill tell you what happens
ἔρως
ἔρως2mo ago
alright
Code-S ♛
Code-S ♛2mo ago
As of what i found footer is causing the white space and for that
@media (max-width: 490px) {
footer {
/* height: 55vw; */
width: unset;
padding-left: 1em;
}
#intern {
height: 140vw;
width: unset;
}
header {
width: unset;
}
}
@media (max-width: 490px) {
footer {
/* height: 55vw; */
width: unset;
padding-left: 1em;
}
#intern {
height: 140vw;
width: unset;
}
header {
width: unset;
}
}
please wait for someones approval i am a noob and might be wrong
ἔρως
ἔρως2mo ago
remove the width like, don't have it there at all
ChairLizard
ChairLizard2mo ago
you are a genius brother, im deeply indebted
ChairLizard
ChairLizard2mo ago
No description
ChairLizard
ChairLizard2mo ago
is there any way to make the text, line and the number for the cash transfer container to be centered without using obscene media queries to make it pixel perfect? i tried adding display flex with justify content and all that but it didnt work maybe its cuz the text has a position of absolute or smth, can you check and tell me? much appreciated
ἔρως
ἔρως2mo ago
no, pixel perfect is a myth you can use grid or flex and use it to center the contents
ChairLizard
ChairLizard2mo ago
i did try and do that, but it didnt work for some odd reason
ἔρως
ἔρως2mo ago
i don't think that place-items: center works
ChairLizard
ChairLizard2mo ago
lemme try
ἔρως
ἔρως2mo ago
try it or, try margin: 0 auto or margin-left: auto; margin-right: auto;
ChairLizard
ChairLizard2mo ago
ill try all of em
ἔρως
ἔρως2mo ago
don't try all of them try one or the other
ChairLizard
ChairLizard2mo ago
place items does this
No description
ChairLizard
ChairLizard2mo ago
yeah ill use the margins now margin: 0 auto; has a similar result
ἔρως
ἔρως2mo ago
something weird there
Code-S ♛
Code-S ♛2mo ago
@ChairLizard can i apply for the internship? from this site?
ChairLizard
ChairLizard2mo ago
ill try to figure it out tmrw, thanks for all the help
ἔρως
ἔρως2mo ago
i believe that that might be soliciting which is against the #📝rules
ChairLizard
ChairLizard2mo ago
oh my b
Code-S ♛
Code-S ♛2mo ago
ohhhh
ἔρως
ἔρως2mo ago
you're not the one possibly breaking the rules
Want results from more Discord servers?
Add your server