İçeriğe geç
ShiftDelete.Net
Haber ara/ SDN'ye SorGiriş
Haber Akışı SDNTV İnceleme Forum Yapay Zeka Akıllı Telefon Elektrikli Otomobil Oyun ShiftDelete.Net Global Teknoloji Haberleri Mobil Otomobil Donanım Savunma Bilim Sosyal Medya İnternet Giyilebilir Teknoloji Rehber Ürünler Son dakika Yazarlar
  1. Ana sayfa
  2. Topluluk
  3. Programlama
  4. Web Programlama (PHP, ASP, HTML, CSS, JavaScript)
Web Programlama (PHP, ASP, HTML, CSS, JavaScript)

Div ve CSS

Joker_TD26.02.20145 cevap7.377 görüntüleme
2014'den beri6 mesaj
#1
Arkadaşlar 3 gündür uğraşıyorum işin içinden çıkamadım. Sayfayı 1. görünümde yapmayı becerdim.(sonunda) Fakat zoom yapınca veya sayfayı küçültünce görünüm çok bozuluyor divler üst üste çıkıyor. Elde etmek istediğim 2. görüntü. Benim elime geçen 3. görüntü. Bi yardım eline ihtiyacım var gibi :) Dün sinirlenip kapatmıştım. Son halini paylaşayım sizinle. Kodları elimden geldiğince anlaşılır şekilde ekliyorum. Şimdiden teşekkür ederim.



HTML


<div id="ust">
</div>


<div id="sol">
</div>

<div id="orta">
  <iframe height="800" width="100%" name="ana_frame" scrolling="auto" frameborder="0" src=""></iframe>
</div>


<div id="sag">
</div>





CSS


 #sol  			{ position : fixed; _position : absolute; top : 200px; _top : expression(eval(document.body.scrollTop));
			      margin-left: 10px; width: 150px; 	 border-style: solid; background-color: #ffbb77;
				  border-width: 1px;	border-color: #0000CC;}


 #ust  			{ position: relative;  width: 600px;    height: 180px;	margin-left: auto; margin-right: auto; overflow: hidden; background: url(1.jpg); } 
 #orta  			{ position: absolute;  width: 600px;   	}
 #sag  			{ position: absolute;  width: 150px;  top : 200px; 	}

Cevaplar
2015'den beri23 mesaj
#2
Joker_TD,

Bunu deneyebilirsin:

HTML
<div id="pagewrap">

<header>
<h1>3 Column Responsive Layout</h1>
</header>

<section id="content">
<h2>1st Content Area</h2>
<p>This page demonstrates a 3 column responsive layout, complete with responsive images and jquery slideshow.</p>
</section>

<section id="middle">
<h2>2nd Content Area</h2>
<p>At full width all three columns will be displayed side by side. As the page is resized the third column will collapse under the first and second. At the smallest screen size all three columns will be stacked on top of one another.</p>
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>
</section>

<aside id="sidebar">
<h2>3rd Content Area</h2>
<p>Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<p>Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.</p>
</aside>

<footer>
<h4>Footer</h4>
<p>Footer text</p>
</footer>

</div>

CSS
@import url(http://fonts.googleapis.com/css?family=Open+Sans);

body {
font-family: 'Open Sans', sans-serif;
color: #666 ;
}

/* STRUCTURE */

#pagewrap {
padding: 5px;
width: 960px;
margin: 20px auto;
}
header {
height: 100px;
padding: 0 15px;
}
#content {
width: 290px;
float: left;
padding: 5px 15px;
}

#middle {
width: 294px; /* Account for margins + border values */
float: left;
padding: 5px 15px;
margin: 0px 5px 5px 5px;
}

#sidebar {
width: 270px;
padding: 5px 15px;
float: left;
}
footer {
clear: both;
padding: 0 15px;
}

/************************************************************************************
MEDIA QUERIES
*************************************************************************************/
/* for 980px or less */ media screen and (max-width: 980px) {

#pagewrap {
width: 94%;
}
#content {
width: 41%;
padding: 1% 4%;
}
#middle {
width: 41%;
padding: 1% 4%;
margin: 0px 0px 5px 5px;
float: right;
}

#sidebar {
clear: both;
padding: 1% 4%;
width: auto;
float: none;
}

header, footer {
padding: 1% 4%;
}
}

/* for 700px or less */ media screen and (max-width: 600px) {

#content {
width: auto;
float: none;
}

#middle {
width: auto;
float: none;
margin-left: 0px;
}

#sidebar {
width: auto;
float: none;
}

}

/* for 480px or less */ media screen and (max-width: 480px) {

header {
height: auto;
}
h1 {
font-size: 2em;
}
#sidebar {
display: none;
}

}

#content {
background: #f8f8f8 ;
}
#sidebar {
background: #f0efef ;
}
header, #content , #middle , #sidebar {
margin-bottom: 5px;
}

#pagewrap , header, #content , #middle , #sidebar , footer {
border: solid 1px #ccc ;
}
2015'den beri2 mesaj
#3
En son (sağ divden sonra) clear divi atarsan bir sıkıntı kalmaz sanırım
2013'den beri38 mesaj
#4
Üstadım çözünürlük farkı olmamasını istiyorsan uzunluk değerlerini "%" ile vermen gerekir. "width: %4" gibi...

Şu kod galiba yardımcı olur...

<style>
.box{
border-style: solid;
border-width: 1%;
border-color: #000000 ;
float: left;
margin-top: 4%;
}

#top {
margin-left: 15%;
margin-right: 15%;

width: 70%;
height: 20%;
}

#left {
width: 10%;
height: 50%;
}

#center {
width: 70%;
height: 50%;
margin-left: 4%;
margin-right: 4%;
}

#right {
width: 10%;
height: 50%;
}
</style>

<div class="box" id="top"></div>
<div class="box" id="left"></div>
<div class="box" id="center"></div>
<div class="box" id="right"></div>
2013'den beri38 mesaj
#5
Buda live görünümü:

alhngzl
2014'den beri34 mesaj
#6
girdiğin #sol divinin position:absolute değerini relative yaparsan üst üste gelmez divler orta ve sağ divlerine de absolute değerlerinide relative yaparsan sorunun ortadan kalkacağına inanıyorum
birde orda position:fixed değerini neden verdin solu sabitlemek mi istiyorsun yoksa öylesine mi yazdın onu kaldırabilirsin bence.

Cevabını yaz

Cevap yazmak için giriş yap ya da üye ol. Eski forum kullanıcı adın ve parolanla girebilirsin.