Jump to content
  • 0

Текст вылетает из DIVa


4arly
 Share

Question

Прошу совета - как решить мою задачу не меняя тэги (крайне желательно), но меняя их стиль.

На примере видно, что текст "МЯЧИКИ" идёт не вначале блока с белым фоном, а только после окончания блока с красным фоном.

Задача:

Размещение текста в левом верхнем углу блока с белым фоном.

Принтскрин из браузера:

n7VZbfHecK4.jpg

Сам код:

<html>
<body>


<div id="osnova" style="display: block; position: relative; margin: auto; margin-top: 0px; left: 0px; top: 0px; height: 800px; width: 600px;
background-color: green;">

<div id="levo" style="float: left; display: block; position: relative; left: 0px; top: 0px; height: 300px; width: 400px; margin: 0px; padding: 0px;
background-color: red;">СЕМЁН
</div>
<div id="pravo1" style="display: block; position: relative; left: 400px; top: 0px; height: 100px; width: 200px; margin: 0px; padding: 0px;
background-color: blue;">КРАБИКИ
</div>
<div id="pravo2" style="display: block; position: relative; left: 400px; top: 0px; height: 100px; width: 200px; margin: 0px; padding: 0px;
background-color: yellow;">НИГЕРЫ
</div>
<div id="pravo3" style="display: block-inline; position: relative; left: 400px; top: 0px; height: 150px; width: 100px; margin: 0px; padding: 0px;
background-color: white;">МЯЧИКИ
</div>

</div>


</body>
</html>

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy