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
div height 100% + padding#0 ili margin #0

 
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
horny_but_sensitive



Joined: 12 Jan 2007
Posts: 65

PostPosted: 26.01.2007 15:02    Post subject: div height 100% + padding#0 ili margin #0 Add user to your forum ignore list Reply with quote

Nisam našao odgovor na isto u nazad tri stranice na forumu, možda sam nekaj preskočio pa pitam.... Želio bih izvesti cijelu stranicu preko div layouta na način da mi se stranica uvijek raširi po VISINI... dakle ako je sadržaj manji od 100%, stranica nek bude 100% visoka, ako je veći neka se pojavi scroller...
Sve je ok dok ne ubacim padding ili margin u div u div-u...

stil.css
Code:

html, body {
   height: 100%;
   background-image:url(bg_00_02.jpg);
   margin:0px;
   padding:0px;
}
#prvi{
   height: 100%;
   width:770px;
   background-color:#CCCCCC;
   margin:10px;
   display:table;
   padding:0px;   
   position:static;
}
#drugi{
   height: 100%;
   width:750px;
   background-color:#99CC00;
   margin-left:10px;   
   margin-right:10px;      
   display:table;
   margin-top:10px;
   margin-bottom:10px;
}

index.html
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>
<link href="0snova/stil.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div align="center" style="height:100%;">
   <div id="prvi">
      <div id="drugi">
         <p>sas sasa sasaas</p>

      </div>
   </div>
</div>
</body>
</html>
skromno molim pomoć...

_________________
jebeno dobar
Back to top
View user's profile Send private message
sinisa



Joined: 05 Dec 2006
Posts: 134

PostPosted: 07.02.2007 09:35    Post subject: Add user to your forum ignore list Reply with quote

si rijesio to ?
Back to top
View user's profile Send private message
horny_but_sensitive



Joined: 12 Jan 2007
Posts: 65

PostPosted: 07.02.2007 14:16    Post subject: Add user to your forum ignore list Reply with quote

drugačije sam napravio...
stavio sam jednu tablicu...

al ovo nisam riješio...

_________________
jebeno dobar
Back to top
View user's profile Send private message
GR



Joined: 02 Apr 2007
Posts: 301
Location: Zagreb

PostPosted: 05.05.2007 02:49    Post subject: Add user to your forum ignore list Reply with quote

jel ima tko da kuži u čemu je tu problem,naime susreo sam se sa sličnim problemom,a neda mi se zezat sa tablicom,pa bih molio za pomoć!tnx
Back to top
View user's profile Send private message
Tristan



Joined: 01 Aug 2006
Posts: 614
Location: Under the sky

PostPosted: 05.05.2007 10:33    Post subject: Add user to your forum ignore list Reply with quote

U div visine 100% u koji želiš trpat sadržaj ubaciš još jedan div kojem ne definiraš visinu..

_________________
Carpe diem...
Back to top
View user's profile Send private message Visit poster's website
GR



Joined: 02 Apr 2007
Posts: 301
Location: Zagreb

PostPosted: 05.05.2007 13:49    Post subject: Add user to your forum ignore list Reply with quote

fala stari! Cheers!
Back to top
View user's profile Send private message
gasjun



Joined: 23 Dec 2005
Posts: 43
Location: Beograd

PostPosted: 05.05.2007 15:43    Post subject: Add user to your forum ignore list Reply with quote

koliko ja shvatam tebi treba css ili div code?
a hoces da napravis prozor recimo H:100pix W:100pix a text ako je veci od prozora da ima skroll.

u tom slucaj znas kako pravis div!!

Insert-> Layout Objects-> Div Tag.
onda kucas text to znas odredis boju bla bla bla naravno Height="100" Width="100"
i position mora biti fixed i onda mu jos stavis OWERFLOW-> SCROLL!!
mislim da je to to sta trazis
Back to top
View user's profile Send private message MSN Messenger
Mihael



Joined: 10 Mar 2006
Posts: 48
Location: Slovenija, Ljubljana

PostPosted: 15.07.2007 23:54    Post subject: Add user to your forum ignore list Reply with quote

Ako imaš neki DIV.... kojem daš npr:

div {
height:100%;
margin:10px; /* to je 20px po širini i 20px po visini
padding:10px; /* to je 20px po širini i 20px po visini
}

vrijednosti margina i paddinga biti če dodane vrijednosti širine (width) ovako:

100% + 40px width + 40px height

što znači da je sada taj div veči nego 100%, i zato dobiješ scroll...

a stvar riješiš ovako (sorry za inline css)

<div style="height:100%">
<div style="margin:10px; padding:10px;"></div>
</div>

Što znači da se 1. divu ne mijenja height... a margin i padding je postingut sa unutrašnjih divom, koji se prilagodi višini diva u kojem se nalazi...

simpl ko pasulj...
Back to top
View user's profile Send private message Visit poster's website
nel`chee



Joined: 08 Jul 2004
Posts: 2087
Location: Rijeka

PostPosted: 16.07.2007 01:18    Post subject: Add user to your forum ignore list Reply with quote

http://www.themaninblue.com/experiment/footerStickAlt/good_example_short.htm

_________________
art & design portfoliofree Photoshop brushes stuffsketchblogfacebook
Back to top
View user's profile Send private message Visit poster's website Twitter profile
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