Benim kullandığım forumda CSS içinde arkaplanı belirlemek için aşağıdaki kod kullanılmakta ;
background: #000000 url(images/main-bg.jpg) repeat-x; text-align: center; line-height:18px; background-attachment: fixed;Şimdi bu kod üzerinden 1. sorum bu arkaplana küçük bir resim eklersem bunu ortalama kodu olarak ne yazmalıyım ? nasıl yazmalıyım? .. ekleyeceğim küçük resim yanyana 20-30 tane değil de sadece ortada 1 tane çıksın derdim..
2. sorum ise bildiğiniz gibi html sayfalarda java script ile resmi tüm sayfaya yayabiliyoruz.. pencere boyutuna göre küçülüp büyüyerek tüm pencereyi kaplayıp resmin tamamının görünmesini sağlıyor.. Aşağıdaki kod bir örnek ;
</head>
<style type="text/css">
body {margin:0px;}
#bg_image {
width: 100%;
height: 100%;
left: 0px;
top: 0px;
position: absolute;
z-index: 0;
}
#contents {
z-index: 1;
position: absolute;
}
</style>
</head>
<body>
<!-- this creates the background image -->
<div id="bg_image">
<img src="http://www.muzikfakultesi.com/enter.jpg" style="width: 100%; height: 100%;">
</div>
<!-- this puts the contents of the page ontop of the background image -->
<div id="contents">
</div>www.muzikfakultesi.com/enter.jpg resmin normal haliwww.muzikfakultesi.com/java.htm resmin bu kodla eklenmiş hali
Şimdi sorum
bu java kodundaki mantığı üstte verdiğim css'ye nasıl uyarlayabiliriz?
% olarak ver demişsin de tam olarak ilk verdiğim cssyi de dahil ederek ne yazmam gerektiğini de söyleyebilir misin?