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
Centriranje floata u css-u

 
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
F@NTOM



Joined: 11 Sep 2003
Posts: 592
Location: Dubrovnik

PostPosted: 06.04.2005 11:06    Post subject: Centriranje floata u css-u Add user to your forum ignore list Reply with quote

Znaci, pitanje je kako da centriram kompletnu stranicu koja ima wrapper div i koji je floatan u lijevo i ima neku određenu sirinu. Probao sam sa auto width marginama ali ne radi u IE (gle cuda), proradi jedino kad stavim npr. lijevu marginu da je 25%, a desna ostane auto. Tada ce radit u firefoxu i operi ali IE to totalno igrnorira.
Trreba mi jedan univerzalni nacin da centriram stranicu a da radi u ff, operi i ie. Ako taj nacin uopce postoji. Nadam se da ste me skuzili, ako treba pejstam cijeli kod. Smile

znaci imam:

#wrapper {
float:left;
margin-left:25%;
margin-right:auto;
width:300px;
...
}

_________________
These pretzels are making me thirsty!
Back to top
View user's profile Send private message
maratz
mi3.crew


Joined: 24 Nov 2003
Posts: 1207
Location: ZAG

PostPosted: 06.04.2005 11:10    Post subject: Add user to your forum ignore list Reply with quote

nemreš imat i ovce i novce...

Makni float, vjerovatno ti niti ne treba (footer može clearat sve iznad njega, ak te to maltretira) ili sve skupa stavi u još jedan wrapper. Za IE ti body treba imati text-align: center; , wrapper text-align: left;

_________________
STOP HITTING YOURSELF! | NETIQUETTE | TYPETESTER | Hypertext rulez™ | CREATIVE NIGHTS | ACCOMMODATIONS
Back to top
View user's profile Send private message Visit poster's website Twitter profile
carr



Joined: 13 Nov 2003
Posts: 1397
Location: Karlovac

PostPosted: 06.04.2005 22:12    Post subject: Re: Centriranje floata u css-u Add user to your forum ignore list Reply with quote

F@NTOM wrote:
Znaci, pitanje je kako da centriram kompletnu stranicu koja ima wrapper div i koji je floatan u lijevo i ima neku određenu sirinu. Probao sam sa auto width marginama ali ne radi u IE (gle cuda), proradi jedino kad stavim npr. lijevu marginu da je 25%, a desna ostane auto. Tada ce radit u firefoxu i operi ali IE to totalno igrnorira.
Trreba mi jedan univerzalni nacin da centriram stranicu a da radi u ff, operi i ie. Ako taj nacin uopce postoji. Nadam se da ste me skuzili, ako treba pejstam cijeli kod. Smile

znaci imam:

#wrapper {
float:left;
margin-left:25%;
margin-right:auto;
width:300px;
...
}


Code:
#wrapper {
margin: 0px auto;
width: 300px;
...


ne kuzim zasto bi floatao wrapper left ako ti je sve centrirano "na sredinu"?
uglavnom margin:0px auto ce ti ga centrirati u svim browserima

_________________
Bolje biti malo lud, nego malo pametan.
Back to top
View user's profile Send private message Visit poster's website
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 06.04.2005 22:45    Post subject: Add user to your forum ignore list Reply with quote

mislim, floataš nešto left, a želiš to centrirati... nisi mi baš jasan Confused

ako kažeš nečemu da ide left, to ti nije baš sredina Wink
Back to top
View user's profile Send private message Send e-mail Visit poster's website
F@NTOM



Joined: 11 Sep 2003
Posts: 592
Location: Dubrovnik

PostPosted: 07.04.2005 14:10    Post subject: Add user to your forum ignore list Reply with quote

wrapper sam floatao left jer sam tako jedino uspio dobit skroz flexibilan sajt koji se rasteze kako dodajem sadrzaj. Ako maknem float kako dodajem sadrzaj u container samo mi se container rasteze, a kako wrapper nema float ne uspijeva ga obuhvatit i container onda ispada.

Code:

body {
   background-image:url(IMAGES/background.gif);
}
#wrapper {
   float:left;
   width:532px;
   margin-top:auto;
   margin-left:auto;
   margin-right:auto;
   margin-bottom:10px;
   border-style:solid;
   border-width:5px;
   border-color:#ffffff;
   clear:left;
}
#container {
   float:left;
   width:530px;
   margin-top:auto;
   margin-left:auto;
   margin-right:auto;
   margin-bottom:0;
   background-color:#F8F8F8;
   border-width:1px;
   border-color:#393939;
   border-style:solid;
   clear:both;
}

_________________
These pretzels are making me thirsty!
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