-1
I’ve already searched the internet for how to do it but none of it is working.
I created a class
calling for .img
for testing and when handling it in CSS, use .img{right: 500px;}
as a test, but nothing happens.
My idea was to place the block of images (all 100px
for 100 px
) starting at 30% of the page, and not centered (which I would say 50%).
Obs.: As I made a page just for use on my PC, I did not put much freshness, just like to make a nice and useful favorite page for me. I don’t program in HTML, I just wanted to make a page like this, and out of curiosity I did it to meet the need.
How is the page -> https://imgur.com/a/N5lJ2
Top image -> How you are with div
inside <center>
Bottom image -> How would you like it to look
HTML code
<!DOCTYPE html>
<html>
<head>
<title>:: Home Page ::</title>
<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="stylesheet" type="text/css" href="estilos.css" media="all" />
</head>
<body background="images/fundo.jpg" bgproperties="fixed">
<!--<center>-->
<div>
<p><img class="img" src="images/bookmarks.png" alt="Bookmarks" /></a></p>
<p>
<a href="https://www.facebook.com/" target="_blank" ><img src="images/fb.png" alt="Facebook" /></a>
<a href="https://forum.pokexgames.com/" target="_blank" ><img src="images/pxg.jpg" alt="PXG Fórum" /></a>
<a href="http://youtube.com/feed/subscriptions" target="_blank" ><img src="images/youtube.jpg" alt="YouTube" /></a>
<a href="https://jovemnerd.com.br/nerdcast/" target="_blank" ><img src="images/jn.jpg" alt="Nerdcast" /></a>
</p>
<p>
<a href="https://github.com/" target="_blank" ><img src="images/github.png" alt="GitHub" /></a>
<a href="https://codefights.com/" target="_blank" ><img src="images/codefights.png" alt="Codefights" /></a>
<a href="https://www.datacamp.com/home" target="_blank" ><img src="images/datacamp.png" alt="Datacamp" /></a>
<a href="http://reborn.farma-alg.com.br/" target="_blank" ><img src="images/farmaalg.jpg" alt="FarmaAlg" /></a>
</p>
<p>
<a href="https://www.codecademy.com" target="_blank" ><img src="images/codecademy.jpg" alt="Codecademy" /></a>
<a href="https://pt.khanacademy.org/" target="_blank" ><img src="images/khan.jpg" alt="Khan Academy" /></a>
<a href="https://trello.com/" target="_blank" ><img src="images/trello.png" alt="Trello" /></a>
<a href="https://www.sololearn.com/" target="_blank" ><img src="images/sololearn.jpg" alt="SoloLearn" /></a>
</p>
<p>
<a href="https://web.whatsapp.com/" target="_blank" ><img src="images/wpp.png" alt="Whatsapp" /></a>
<a href="https://www.urionlinejudge.com.br/judge/pt/" target="_blank" ><img src="images/urionline.gif" alt="URI Judge" /></a>
<a href="https://br.pinterest.com/" target="_blank" ><img src="images/pinterest.png" alt="Pinterest" /></a>
<a href="https://webmail.inf.ufpr.br/?_task=mail&_mbox=INBOX" target="_blank" ><img src="images/roundcube.png" alt="Roundcube" /></a>
</p>
<div>
<!--</center>-->
</body>
</html>
CSS code:
.img {right: 500px}
right: 500px;
is to position at 500 pixels on the right. Is this what you want to do ? However it only works for relative or absolute positioning. Or are you trying to assign the image size ? I couldn’t figure out what you’re trying to do.– Isac
https://imgur.com/a/NHhHu Look at this image. The inside square would be the 4x4 grid of images(100px per 100px each). On the top image is how the grid is using <center>. And the bottom image is with oeu would like it to stay, but using these codes it does not move. Even if I take the <center> is all on the left only, without moving even a px.
– Manolloz
Try putting
position: relative;
in class.img
– Sam
Besides, there’s a
</a>
remaining after the image.– Sam
Missing position: relative really. Thank you very much.
– Manolloz