Blitz Posted August 28, 2006 Report Share Posted August 28, 2006 ir lapele kas veidota izmantojot div elementus (stulbi jaa), visi ir absoluti pozicioneti attiecibaa pret container div. Nu vot, tagad paradijas vajadziba container div iecentret (lai lapele visu laiku dinamiski atrastos centraa). Visadi izmeiginajos, bet neizdodas iecentreet, visu laiku liip pie kreisaas malas. Seit html kods: <div id="centerdiv"> <div id="shadowdiv"></div> <div id="headdiv"><img src="./images/head.jpg" width="900px" border="0"></div> <div id="leftdiv"><p align="center"><?include "./menu/leftmenu.php";?></p></div> <div id="topmenu"><p align="center"><?include "./menu/topmenu.php";?></p></div> <div id="framediv"><iframe src="<? echo $src; ?>"></div> </div> Nu redzams ka ir viens raamis un parejie ir ieksh viņa. Seit buus ari css ar ko ir pozicionets centerdiv un lidzigi ari parejie. div#centerdiv { position:absolute; left:15%; top: 0px; width:895px; height:600px; border:solid 1px; border-top: none; background-image: url(../images/pattern.gif); background-repeat: repeat; } ir meiginats uzstaisit tabulu pa visu lapu un to divu centret ka tabulas elementu, ir meiginats likt paragraafaa un centret paragrafu. Butu coini ja kads palidzetu. Paldies. Link to comment Share on other sites More sharing options...
Delfins Posted August 28, 2006 Report Share Posted August 28, 2006 (edited) left: auto; ?? sorry, sajaucu, tas bija marginam div#centerdiv { margin: 0 auto; width:895px; height:600px; border:solid 1px; } PS: es joprojām nesaprotu, kāpēc ir jājautā forumā, jo google man izdod pirmo linku ar pareizu atbildi - un tas viss notiek 2sec laikā... Edited August 28, 2006 by Delfins Link to comment Share on other sites More sharing options...
Blitz Posted August 28, 2006 Author Report Share Posted August 28, 2006 position:absolute; left:auto; top:0px; nestradaa Link to comment Share on other sites More sharing options...
Blitz Posted August 28, 2006 Author Report Share Posted August 28, 2006 ari nepalidz. Ieveroju interesantu lietu. Uzliekot body margin-left: 200px; pabidas pats container bet vina saturs paliek uz vietas. Cik saprotu ka ieksejie elementi tacu pozicionejas peec parent elementa, sai gadijumaa centerdiv. Varbut kautkur noticis taads gluks, bet parbaudiju html, visi tagi aizverti, viss kaa vajag. P.S. googleet ta guugleju, izmeiginats tika daudz, bet rezultata nav, tape uzjautaju seit. Link to comment Share on other sites More sharing options...
Delfins Posted August 28, 2006 Report Share Posted August 28, 2006 na? absolute? Link to comment Share on other sites More sharing options...
Blitz Posted August 28, 2006 Author Report Share Posted August 28, 2006 (edited) izsakies ludzu bisk skaidrak :) Edited August 28, 2006 by Blitz Link to comment Share on other sites More sharing options...
Delfins Posted August 28, 2006 Report Share Posted August 28, 2006 kas tev nav skaidrs? NAFIG TEV ABSOLUTE? imho ja ir absolute visiem objektiem, tad bez JS pārrēķināšanas neiztikt, ja gribi centrēt... tāpēc viņš jau arī saucās `absolute` Link to comment Share on other sites More sharing options...
Blitz Posted August 28, 2006 Author Report Share Posted August 28, 2006 na? absolute? Nu ko tad var saprast no sitada? Tagad skaidrs, naksies partaisit visu savadak. Paldies. Link to comment Share on other sites More sharing options...
Recommended Posts