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 ; }
} #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
the body has a default margin of 8px
maybe those translates are causing it??
depending on the content of the element, it won't cause overflow
but i'm guessing
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
then can you grab everything and put it in a codepen or jsfiddle?
ah, unfortunately im not familiar with Js, only been a month or two since ive picked up Html and Css
what?
is codepen or jsfiddle part of html and css?
no, it's to show your code working
oh, my bad, im unfamiliar with that
can you explain it to me
it's self explanatory, literally
just go to the website and you will understand imediatelly
i see
gimme a few minutes and ill go check it out
take your time
i put it in
i actually already bought a hostinger sub for hosting the website, this is supposed to be a website for an NGO my friend made
we need the link to see it running
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
well, one thing you can do is to remove the width of the footer
for
padding:0
and margin : 0
use the universal tag *
don't do that
for future files you know
also no
that's a terrible idea
why? everyone does that? how do you do 0 then?
i use a proper css reset
nuking margins and paddings is awful since you will have to put them back in anyways
😑
now that i think about it, that's a splendid idea
ill remember that for the future, thanks!
it's one of the things that's causing you overflow
also, don't set an height on your footer either
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
just remove the right padding
right
ill try and ill tell you what happens
alright
As of what i found footer is causing the white space and for that
please wait for someones approval i am a noob and might be wrong
please wait for someones approval i am a noob and might be wrong
remove the width
like, don't have it there at all
you are a genius brother, im deeply indebted
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
no, pixel perfect is a myth
you can use grid or flex and use it to center the contents
i did try and do that, but it didnt work for some odd reason
i don't think that
place-items: center
workslemme try
try it
or, try
margin: 0 auto
or margin-left: auto; margin-right: auto;
ill try all of em
don't try all of them
try one or the other
place items does this
yeah ill use the margins now
margin: 0 auto; has a similar result
something weird there
@ChairLizard can i apply for the internship? from this site?
ill try to figure it out tmrw, thanks for all the help
i believe that that might be soliciting
which is against the #📝rules
oh my b
ohhhh
you're not the one possibly breaking the rules