theNTH Posted February 23, 2009 Report Share Posted February 23, 2009 (edited) Uztaisiji photoshopā dīzainu, un tagad mocīšos dabūt jau caur internetpārlukprogrammu skatāmu. Mana problēma ir tāda, ka es nesaprotu kā var nocentrēt div'us, <center> neder, biju jau meklējis informāciju, bet vēljoprojām nesanāk. Es caur div content mēģināju to visu stuffu iecentrēt. Vajag tā, lai divs būtu iecentrēts, bet viss kas tajā iekšā - nē. index.html ... <body> <div class="content"> <div class="contentTop" <img src="images/content_top.png" /> </div> <div class="contentBg"> <img src="images/content_bg.png" "/> <p>Teksts.</p> <div class="contentBottom"> <img src="images/content_bottom.png" /> </div> </div> </div> </body> </html> style.css body { font-family: Tahoma; font-size: 11px; color:#FFFFFF; background-color:#181818; } .contentTop { width: 616px; border:0; } .contentBottom { width: 616px; border:0; } .contentBg { width: 616px; border: 0px; background:url(images/content_bg.png) repeat-y; } EDIT: paldies vincister, bet netaisiet vēl ciet topiku, noteikti radīsies vēl jautājumi. Edited February 23, 2009 by theNTH Link to comment Share on other sites More sharing options...
vincister Posted February 23, 2009 Report Share Posted February 23, 2009 margin:0 auto; Link to comment Share on other sites More sharing options...
X ID Posted February 24, 2009 Report Share Posted February 24, 2009 (edited) First of all iesaku uzlikt doctype. Centrēt wrapper'i, nevis katru elementu atsevišķi (tavā gadījumā: div.content) un wrapper'im izmantot id, nevis klasi <div id="wrapper"> </div> Centrēt var tikai to elementu, kam ir noteikts platums (loģiski, ne?) * { margin: 0; padding: 0; } #wrapper { width: 616px; margin: 0 auto; } Edited February 24, 2009 by X ID Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now