vitao.web Posted August 6, 2010 Report Share Posted August 6, 2010 Labdien! Veidoju logu, kas izskatās kā rāmis. Ideja ir vienkārša: <div id="ramis"> <div id="ieksa"> kkads texts </div> </div> #ramis {background: #fffff; height: 300px; width: 1024px; margin: 0px auto 0px auto; // lai butu vidu} #ieksa {height: 282px; width: 1018px; margin: 4px 4px 4px 4px; border: 1px solid red;} Bet man kaut kā tas viss nenostrādā. Kur varētu būt kļūda, un kā varētu labāk šo visu izveidot? Quote Link to comment Share on other sites More sharing options...
Леший Posted August 6, 2010 Report Share Posted August 6, 2010 Kas tieši nenostrādā? Quote Link to comment Share on other sites More sharing options...
vitao.web Posted August 6, 2010 Author Report Share Posted August 6, 2010 (edited) Kas tieši nenostrādā? Man vins nav pa vidu. Ideja ir tada, ka tai ieksai ir ramis (border) un vajag ta lai ta ieksa ir 4px prom no ta lielaka diva , bet no visam pusem 4px;... EDIT: Pareizak butu teikt ta: ir 2 kvadrati ( mana gadijuma tie ir taisnturi ) un gribas lai ir lielais kvadars un vin ieksa mazaks kvadrats, kas no visam liela kvadrata malam ir 4px attaluma. // ta varbut saprotamak bus // Edited August 6, 2010 by vitao.web Quote Link to comment Share on other sites More sharing options...
Леший Posted August 6, 2010 Report Share Posted August 6, 2010 hint: 1024 - 1018 != 8. Quote Link to comment Share on other sites More sharing options...
vitao.web Posted August 6, 2010 Author Report Share Posted August 6, 2010 hint: 1024 - 1018 != 8. Nav ista vaina. Man ta pat vins nepozicionejas vidu. css kods: #slide_box { background: #FFFFFF; height: 360px; width: 1024px; margin: 0px auto 0px auto;} #slide_frame{ background: #99CC00; height: 356px; width: 1020px; margin: 4px 4px 4px 4px; border: 1px solid #B0C4DE; } Quote Link to comment Share on other sites More sharing options...
101111 Posted August 6, 2010 Report Share Posted August 6, 2010 (edited) tam iekšējam rāmim tak nepietiek vietas, lai ielīstu ārējā rāmi. 1020+4+4+2 > 1024 Edited August 6, 2010 by 101111 Quote Link to comment Share on other sites More sharing options...
vitao.web Posted August 6, 2010 Author Report Share Posted August 6, 2010 (edited) tam iekšējam rāmim tak nepietiek vietas, lai ielīstu ārējā rāmi. 1020+4+4+2 > 1024 primit bija ari istais 1024 - 4 -4 -2 = 1014px; 360 - 4 -4 -2= 350px; bet ta pat nav vidu :( Edited August 6, 2010 by vitao.web Quote Link to comment Share on other sites More sharing options...
Леший Posted August 6, 2010 Report Share Posted August 6, 2010 screen? Quote Link to comment Share on other sites More sharing options...
101111 Posted August 6, 2010 Report Share Posted August 6, 2010 Bet jāierēķina arī iekšējās kastes borderis. Tā ka 1014 un 350. Bet vispār labāk neizmantot tos marginus. Nofiksē iekšējai kastei platumu un garumu par 10px mazāku nekā ārējai kastei un iecentrē izmantojot margin: auto. (Patiesībā neesu pārliecināts ka tāds variants iecentrēs gan horizontāli un vertikāli vienlaicīgi, izsaku tikai minējumu) Quote Link to comment Share on other sites More sharing options...
vitao.web Posted August 6, 2010 Author Report Share Posted August 6, 2010 (edited) Un ja es paimainu margin: 4px uz kko citu mazajam kvadratam, tad lielais ari uzreiz paiet uz leju ( talak no menu ) Edited August 6, 2010 by vitao.web Quote Link to comment Share on other sites More sharing options...
Леший Posted August 6, 2010 Report Share Posted August 6, 2010 Kads doctype? Quote Link to comment Share on other sites More sharing options...
vitao.web Posted August 6, 2010 Author Report Share Posted August 6, 2010 (edited) Kads doctype? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ATRISINATS: Panemu "parentam" jeb pirmajam divam ieliku display: table un viss aizgaja :) Edited August 6, 2010 by vitao.web Quote Link to comment Share on other sites More sharing options...
Леший Posted August 6, 2010 Report Share Posted August 6, 2010 display:table neJies dažos browseros. Quote Link to comment Share on other sites More sharing options...
vitao.web Posted August 6, 2010 Author Report Share Posted August 6, 2010 display:table neJies dažos browseros. Piemeram kuros? Quote Link to comment Share on other sites More sharing options...
sheps Posted August 6, 2010 Report Share Posted August 6, 2010 <div id="ramis"><center><div id="ieksa"> kkads texts </div></center></div> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.