CSS- help pozica divu

Programovacie jazyky, rady, poradňa...
jasol
Zablokovaný
Zablokovaný
Príspevky: 11
Registrovaný: 04 júl 2008, 21:35

CSS- help pozica divu

Príspevok od používateľa jasol »

Mam problem, nikde neviem najst co mam napisat aby som div vycentroval do stredu stranky....

myslism to tak kao napriklad <center> </center>, ale to s apouyiva na text.... pls co mam pouyit na divz ???
zaggi
Medium Star
Medium Star
Používateľov profilový obrázok
Príspevky: 314
Registrovaný: 04 feb 2007, 19:32

Príspevok od používateľa zaggi »

Kód: Vybrať všetko

<div style="margin-left: auto; margin-right: auto;"></div>
It is based on the rule in the CSS2 Visual formatting model details that states that if both margin-left and margin-right are 'auto', their computed values are equal.
btw, <center> uz sa nepouziva, je deprecated, formatovanie sa robi cez CSS ...
jasol
Zablokovaný
Zablokovaný
Príspevky: 11
Registrovaný: 04 júl 2008, 21:35

Príspevok od používateľa jasol »

ano ja viem ye cey css text-align: center ale iba som vysvetloval co potrebujem.... dikes... :)) k+
Napísať odpoveď