Позициониране на текст

Dizasterr

Registered
Здравейте! Как мога да задам подравняване на текста в един див да е в в долния му край ? До сега се мъчиш, но текста си стои все отгоре.
 
Единственото бачкащо нещо за което се сещам е това:

Код:
<div style="width : 400px;height : 400px;border : 1px solid black;position : relative;">
<span style="position : absolute;bottom : 0;">text, text</span>
</div>
 
<style type="text/css">
body {
font-family: arial;
}
#box {
width: 200px;
height: 200px;
font-size: 8pt;
vertical-align: bottom;
background-color: green;
position: relative;
}
#box span {
position: absolute;
bottom: 0;
margin: 0;
}
</style>
<div id="box"><span>This is text...</span></div>
try it out! :?:
 
Liberate каза:
<style type="text/css">
body {
font-family: arial;
}
#box {
width: 200px;
height: 200px;
font-size: 8pt;
vertical-align: bottom;
background-color: green;
position: relative;
}
#box span {
position: absolute;
bottom: 0;
margin: 0;
}
</style>
<div id="box"><span>This is text...</span></div>
try it out! :?:
Стана, но текста ми отиде в дясно.
 
Dizasterr каза:
Liberate каза:
<style type="text/css">
body {
font-family: arial;
}
#box {
width: 200px;
height: 200px;
font-size: 8pt;
vertical-align: bottom;
background-color: green;
position: relative;
}
#box span {
position: absolute;
bottom: 0;
margin: 0;
}
</style>
<div id="box"><span>This is text...</span></div>
try it out! :?:
Стана, но текста ми отиде в дясно.
омг с какъв браузър си!?!?!? предполагам че искаше да напишеш ляво нали? :D
 
Liberate каза:
Dizasterr каза:
Liberate каза:
try it out! :?:
Стана, но текста ми отиде в дясно.
омг с какъв браузър си!?!?!? предполагам че искаше да напишеш ляво нали? :D
Не текста замина в дясно. Иначе съм с ис Mozilla. Незнам пробвах с float: center, div align="center", <center></center> и нестава.
 
Dizasterr каза:
Liberate каза:
Dizasterr каза:
Стана, но текста ми отиде в дясно.
омг с какъв браузър си!?!?!? предполагам че искаше да напишеш ляво нали? :D
Не текста замина в дясно. Иначе съм с ис Mozilla. Незнам пробвах с float: center, div align="center", <center></center> и нестава.
Аз съм с Firefox последна версия и ми поставя текста вляво.
Код:
<style type="text/css">
body {
font-family: arial;
}
#box {
	width: 200px;
	height: 200px;
	font-size: 8pt;
	vertical-align: bottom;
	background-color: green;
	position: relative;
}
#box span {
	position: absolute;
	bottom: 0;
	margin: 0;
	left: 70px;
}
</style>
<div id="box"><span>This is text...</span></div>
Пробвай така, а ако не стане, промени:
Код:
left: 70px;
на:
Код:
right: 70px;

Float: center няма. Да го знаеш за напред.
Има left, right, inherit и none. :)
 

Back
Горе