-3
I’m creating an HTML page for someone special, I believe this person will open the page on mobile, however, my page appears in two different ways on computer and mobile. On the computer she appears all cute, now on the mobile one of the elements goes to the top being that I want it centered on the screen. So I was wondering if there is any code that changes the page only on the mobile, to use the command top: px
.
I also wanted to know if you have some "universal" command to put in the size of the element, because I put the pixels according to my monitor, on the monitor of a friend of mine is a part left of the page. Note: I’m already using meta for mobile, my problem is more with the position of the element and not the mobile adaptability.
My code is like this:
Part of the CSS
//carousel com bootstrap//
#myCarousel
{
width: 100%;
height: 100%;
margin: auto;
display: block;
position: absolute;
}
//imagem que ocupa a tela//
#Random
{
width: 100%;
height: 100%;
max-height: 626px;
max-width: 833px;
margin: auto;
display: block;
vertical-align: middle;
}
Obs 2.0: apparently the command vertical-align: middle
is not working, because the image was not centered vertically on the mobile.
Edit:
As you can see the page is responsive, my problem is that in mobile the element is there at the top, I want to center it to leave with a better aesthetic.
Dear on Youtube there are hundreds of courses for free, in Portuguese of how to make responsive websites and everything else, I strongly recommend that you research for some and study a lot. Abs
– hugocsl
Create responsive websites take a lot of work even. You will have to
Dominar
HTML
,CSS
andJava Script
. There is no fixed formula for creating responsive websites.– Solkarped