Javascript-форум (https://javascript.ru/forum/)
-   (X)HTML/CSS (https://javascript.ru/forum/xhtml-html-css/)
-   -   Background выше содержимого блока (https://javascript.ru/forum/xhtml-html-css/16003-background-vyshe-soderzhimogo-bloka.html)

ksa 23.03.2011 11:00

walik, уместнее применить

background-position: center center;

ksa 23.03.2011 11:04

Или так

<style>
.place {
	background-image: url('http://neocubs.ru/images/image-1.jpg');
	background-repeat: no-repeat;
	background-position: center center;
	width: 235px;
	height: 170px;
}
.border {
	background-image: url('http://neocubs.ru/images/border.png');
	background-repeat: no-repeat;
	background-position: center center;
	width: 100%;
	height: 100%;
}
</style>
<div class="place">
	<div class="border"></div>
</div>

MCTrane 23.03.2011 17:52

Ясно, спасибо

MCTrane 23.03.2011 19:57

Убрал DOCTYPE, всё норм стало :)


Часовой пояс GMT +3, время: 23:12.