1

I have a picture and I need to move it under the word with a dash, but I can't do it

for some reason he does not want to raise this icon and now I add others and he puts them even lower

code:

<a href="https://vk.com/feed"><img src="vk.png" 
    height="70" width="70" style="margin-left: 1130px; margin-top: 0px;" ></a>

enter image description here

all code :

<html>
<head>
  <title>Ответы на ОГЭ,ЕГЭ,ВПР,ОЛИМПИАДЫ</title>
  <link rel="shortcut icon" href="favicon.png" type="image/png" />
    <style>
        body {
            background: url(back.jpg) no-repeat;
            -moz-background-size: cover;
            -webkit-background-size: cover;
            -o-background-size: cover;
            background-size: cover;
        }           
    </style>
</head>
<body style="background-attachment:fixed" topmargin="0">

  <a href="file:///C:/Users/Леонид/Desktop/сайт/index.html">
    <img src="name.png" height="175" width="290" style="margin-left:80px; margin-top:10px;">
  </a>

  <h1 style="position: absolute; top: 0; text-align: right; width: 87%;">Подпишись</h1> 

  <img src="line.png" height="180" width="260" style="margin-left:750px; margin-top:7px;">

  <a href="https://vk.com/otvet2020ru">
    <img src="vk.png" height="70" width="70" style="margin-left:1130px; margin-top:0px;">
  </a>

</body>
</html>

1 Answer 1

2

You only should move the <a> tag into <h1> tag, then margin-left:1130px; margin-top:0px; are no longer necessaries

<html>
<head>
  <title>Ответы на ОГЭ,ЕГЭ,ВПР,ОЛИМПИАДЫ</title>
  <link rel="shortcut icon" href="favicon.png" type="image/png" />
    <style>
        body {
            background: url(back.jpg) no-repeat;
            -moz-background-size: cover;
            -webkit-background-size: cover;
            -o-background-size: cover;
            background-size: cover;
        }           
    </style>
</head>
<body style="background-attachment:fixed" topmargin="0">

  <h1 style="position: absolute; top: 0; text-align: right; width: 87%;line-height: 40px;border: 1px solid blue;">  
      <a href="https://vk.com/otvet2020ru" style="display: -moz-grid-group;border: 2px solid red;">
         <img src="vk.png" width="70" height="70"></a>Подпишись
  </h1> 

  <img src="line.png" style="margin-left:750px; margin-top:7px;" width="260" height="180">

</body>
</html>

In order to help you faster should link the images to a internet url, so you and we can use code snippet tool here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.