Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
Ne mogu centrirati div :(

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side
View previous topic :: View next topic  
Author Message
sale072



Joined: 23 Dec 2008
Posts: 27

PostPosted: 19.02.2010 19:12    Post subject: Ne mogu centrirati div :( Add user to your forum ignore list Reply with quote

2 dana se zafrkavam oko ovoga...

Imam 2 DIV-a..

1. u kojem je slika/logo i on ne treba da mrda s lijevog vrha stranice..i to sam riješio.

2. DIV koji sam postavio u sredinu stranice ali, ili mi prelazi preko lijevog ako ga ne fixiram, a ako ga fixiram, pa.. stoji gdje jest, ne pomjera se u skladu sa resizeom browsera...

Dakle da li je moguće postaviti desni div na sredinu stranice i da se pomjera kad smanjimo browser ali da ne prelazi preko lijevog ?

Unaprijed zahvalan!

Evo code:

Code:

body {
   background: #cccccc;
}

#logo {
   width: 338px;
   margin: -7px;
}

#content {
   width: 400px;
   height: 500px;
   background: white;
   margin-top: -150px;
   margin-left: 300px;
}
Back to top
View user's profile Send private message
hrvoje_86



Joined: 06 Dec 2006
Posts: 107
Location: Zagreb

PostPosted: 19.02.2010 19:23    Post subject: Add user to your forum ignore list Reply with quote

Trebaš ljevu kolonu široku 338px i desnu koja zauzima sav desni prostor ?
Code:

.left-div{
 float:left;
 width:338px;
}
.right-div{
  margin-left:338px;
}
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
sale072



Joined: 23 Dec 2008
Posts: 27

PostPosted: 19.02.2010 19:31    Post subject: Add user to your forum ignore list Reply with quote

http://img.ba/pyqh

trbam da mi ovaj bijeli DIV u koji ce ici sadrzaj bude na sredini stranice,a kad resizeam browser da se pomjera sukladno tome lijevo-desno,ali da ne ide preko ovog LOGO... Sad
Back to top
View user's profile Send private message
hrvoje_86



Joined: 06 Dec 2006
Posts: 107
Location: Zagreb

PostPosted: 19.02.2010 19:40    Post subject: Add user to your forum ignore list Reply with quote

Ovak ?
Code:

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body{
   padding-left:200px;   
}
.ld{
   width:200px;
   height:200px;
   background-color:#F00;
   position:absolute;
   z-index:100;
   left:0;
}
.rd{
   width:400px;
   height:1000px;
   margin:auto;
   border:1px solid #000;
}
</style>
</head>

<body>
<div class="ld">
</div>
<div class="rd">
</div>
</body>
</html>
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
hrvoje_86



Joined: 06 Dec 2006
Posts: 107
Location: Zagreb

PostPosted: 19.02.2010 19:53    Post subject: Add user to your forum ignore list Reply with quote

Da bude skroz u sredini treba ga staviti u još jedan div
Code:

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body{
   
}
.ld{
   width:200px;
   height:200px;
   background-color:#F00;
   position:absolute;
   z-index:100;
   left:0;
}
.rOuter{
   width:600px;
   margin:auto;
   padding:0 200px;
}
.rd{
   height:1000px;
   border:1px solid #000;
}
</style>
</head>

<body>
<div class="ld">
</div>
<div class="rOuter">
    <div class="rd">
    </div>
</div>
</body>
</html>

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
sale072



Joined: 23 Dec 2008
Posts: 27

PostPosted: 19.02.2010 19:54    Post subject: Add user to your forum ignore list Reply with quote

Eee tako nešto... uz male prepravke mislim da je to to... HVALAAA puno !
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group