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
ἔρως
ἔρως4mo ago
the body has a default margin of 8px
Mannix
Mannix4mo ago
maybe those translates are causing it??
ἔρως
ἔρως4mo ago
depending on the content of the element, it won't cause overflow but i'm guessing
ChairLizard
ChairLizardOP4mo 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
ἔρως
ἔρως4mo ago
then can you grab everything and put it in a codepen or jsfiddle?
ChairLizard
ChairLizardOP4mo ago
ah, unfortunately im not familiar with Js, only been a month or two since ive picked up Html and Css
ἔρως
ἔρως4mo ago
what?
ChairLizard
ChairLizardOP4mo ago
is codepen or jsfiddle part of html and css?
ἔρως
ἔρως4mo ago
no, it's to show your code working
ChairLizard
ChairLizardOP4mo ago
oh, my bad, im unfamiliar with that can you explain it to me
ἔρως
ἔρως4mo ago
it's self explanatory, literally just go to the website and you will understand imediatelly
ChairLizard
ChairLizardOP4mo ago
i see gimme a few minutes and ill go check it out
ἔρως
ἔρως4mo ago
take your time
ChairLizard
ChairLizardOP4mo ago
i put it in
No description
ChairLizard
ChairLizardOP4mo 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
ἔρως
ἔρως4mo ago
we need the link to see it running
ChairLizard
ChairLizardOP4mo 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
ἔρως
ἔρως4mo ago
well, one thing you can do is to remove the width of the footer
Code-S ♛
Code-S ♛4mo ago
for padding:0 and margin : 0 use the universal tag *
ἔρως
ἔρως4mo ago
don't do that
Code-S ♛
Code-S ♛4mo ago
for future files you know
ἔρως
ἔρως4mo ago
also no that's a terrible idea
Code-S ♛
Code-S ♛4mo ago
why? everyone does that? how do you do 0 then?
ἔρως
ἔρως4mo 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 ♛4mo ago
😑
ChairLizard
ChairLizardOP4mo ago
now that i think about it, that's a splendid idea ill remember that for the future, thanks!
ἔρως
ἔρως4mo ago
it's one of the things that's causing you overflow also, don't set an height on your footer either
ChairLizard
ChairLizardOP4mo 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
ἔρως
ἔρως4mo ago
just remove the right padding
ChairLizard
ChairLizardOP4mo ago
right ill try and ill tell you what happens
ἔρως
ἔρως4mo ago
alright
Code-S ♛
Code-S ♛4mo 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
ἔρως
ἔρως4mo ago
remove the width like, don't have it there at all
ChairLizard
ChairLizardOP4mo ago
you are a genius brother, im deeply indebted
ChairLizard
ChairLizardOP4mo ago
No description
ChairLizard
ChairLizardOP4mo 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
ἔρως
ἔρως4mo ago
no, pixel perfect is a myth you can use grid or flex and use it to center the contents
ChairLizard
ChairLizardOP4mo ago
i did try and do that, but it didnt work for some odd reason
ἔρως
ἔρως4mo ago
i don't think that place-items: center works
ChairLizard
ChairLizardOP4mo ago
lemme try
ἔρως
ἔρως4mo ago
try it or, try margin: 0 auto or margin-left: auto; margin-right: auto;
ChairLizard
ChairLizardOP4mo ago
ill try all of em
ἔρως
ἔρως4mo ago
don't try all of them try one or the other
ChairLizard
ChairLizardOP4mo ago
place items does this
No description
ChairLizard
ChairLizardOP4mo ago
yeah ill use the margins now margin: 0 auto; has a similar result
ἔρως
ἔρως4mo ago
something weird there
Code-S ♛
Code-S ♛4mo ago
@ChairLizard can i apply for the internship? from this site?
ChairLizard
ChairLizardOP4mo ago
ill try to figure it out tmrw, thanks for all the help
ἔρως
ἔρως4mo ago
i believe that that might be soliciting which is against the #📝rules
ChairLizard
ChairLizardOP4mo ago
oh my b
Code-S ♛
Code-S ♛4mo ago
ohhhh
ἔρως
ἔρως4mo ago
you're not the one possibly breaking the rules
Want results from more Discord servers?
Add your server