Jump to content
  • 0

Проблема с блоком


WhiteNight
 Share

Question

Не могу понять почему блок text_mark не липнет к правому краю родительского блока.

Вообще хочу его распложить ниже navigation, но по правому краю.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
<meta name="author" content="WhiteNight" />

<title>Неназванный 2</title>
<style>
.one {
height: 400px;
width: 800px;
border: 1px solid blue;
}
#search {
text-align: right;
padding: 5px;
float: right;
padding-right: 10px;

}
#search input {
border-bottom: 1px dotted gray;
padding: 2px 3px;
color: gray;
}
#navigation {
float: left;
margin: 32px 20px;

}
#navigation a {
font-size: 12px;
}
#text_mark {
position: relative;
top: 64px;
right: 0;
float: right;
font-family: Verdana;
font-size: 12px;
color: #7e7e7e;
}

</style>
</head>

<body>

<div class="one">
<div id="search"><form action="#"><input type="text" value=" Поиск..."/></form></div>
<div id="navigation"><a href="#">Главное</a>-><a href="#">Об авто</a>-><a href="#">Отзывы</a></div>
<div id="text_mark">Еще текст</div>

</div>

</body>
</html>

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Что-то много лишнего в коде. Если нужно разместить по правому краю, не обязательно использовать float, можно обойтись и вырваниванием:

#text_mark {

clear: both;

text-align: right;

font-family: Verdana;

font-size: 12px;

color: #7e7e7e;

}

Link to comment
Share on other sites

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