Sephy Posted March 26, 2008 Report Share Posted March 26, 2008 tatad problema tada ka labais divs(right1) nokrit uz leju!!! vjag lai vinsh paliek turpat kur ir divs ar nosaukumu left1 kods: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1250"> <meta name="generator" content="PSPad editor, www.pspad.com"> <link rel="stylesheet" type="text/css" href="./main.css"> <title> </title> </head> <body> <div id="main"> <div id="left"> <div id="first"> <div id="left1"> </div> <div id="right1"> </div> </div> </div> <div id="right"> </div> </div> </body> </html> un css: /* CSS Document */ html{ height:100%; width:100%; } body{ height:100%; width:100%; margin:0px; padding:0px; } #main{ height:100%; width:100%; background-color:blue; } #left{ position:relative; width:70%; float:left; height:100%; background-color:purple; } #first{ width:100%; position:absolute; height:475px; background-color:red; } #left1{ margin: 0 auto; text-align: left; height:100%; width:496px; background-color:black; } #right1{ border:solid 3px green; z-index:11; float:right; height:100%; width:28px; background-color:white; } #right{ float:right; height:100%; width:30%; background-color: yellow; } Link to comment Share on other sites More sharing options...
Evi Posted March 26, 2008 Report Share Posted March 26, 2008 tad nodefinee: #left1{ float:left} Man jaut, tu veel sarezhgjiitaaku kodu nevareeji uzraxtiit ?! Tu pats vari paskaidrot, kam tev vajag visus position:relative, absolute un z-indexus ? Link to comment Share on other sites More sharing options...
Sephy Posted March 26, 2008 Author Report Share Posted March 26, 2008 tad nodefinee: #left1{ float:left} Man jaut, tu veel sarezhgjiitaaku kodu nevareeji uzraxtiit ?! Tu pats vari paskaidrot, kam tev vajag visus position:relative, absolute un z-indexus ? ja nodefinaa float;left tad vairak necentrejas mans left1. tos z indexus un positionus var pagaidam nenemt veraa jo man vel pec tam tur bus jaliek 3 divs un tura ar shie noderes Link to comment Share on other sites More sharing options...
Evi Posted March 26, 2008 Report Share Posted March 26, 2008 Nu tad, ja tev tik sarezhjgiiti vajag, tad liec left1 veelvienaa divaa, kur aareejam divam nodef float:left un ieksheejam margin:0 auto. Link to comment Share on other sites More sharing options...
Sephy Posted March 26, 2008 Author Report Share Posted March 26, 2008 Nu tad, ja tev tik sarezhjgiiti vajag, tad liec left1 veelvienaa divaa, kur aareejam divam nodef float:left un ieksheejam margin:0 auto. nu es taa jau pats pa sho laiku izdomaju ;P Link to comment Share on other sites More sharing options...
Evi Posted March 26, 2008 Report Share Posted March 26, 2008 Bet tev buutu stipri jaapiedomaa pie code vienkaarshoshanas, naf tev #main vajag vispaar? bg tu vari nodefineet arii body un buus tev fons zils. Link to comment Share on other sites More sharing options...
Sephy Posted March 26, 2008 Author Report Share Posted March 26, 2008 Bet tev buutu stipri jaapiedomaa pie code vienkaarshoshanas, naf tev #main vajag vispaar? bg tu vari nodefineet arii body un buus tev fons zils. tas ir taikai pagaidam lai redzetu kur mani lauki salikushies(vai pareizajaas vietaas) Link to comment Share on other sites More sharing options...
Aikss Posted March 27, 2008 Report Share Posted March 27, 2008 Lai redzētu kur lauki(elementi) izvietojušies izmanto border: 1px solid red. Katram elementam savādāku krāsu liec. Un kad esi beidzis vienkārši uzliec vieninieka vietā nulli! Ja viss iet baigi precīzi, neaizmirsti ņemt vērā šo 1 px, kas iespaidos platumu un augstumu. Link to comment Share on other sites More sharing options...
andrisp Posted March 27, 2008 Report Share Posted March 27, 2008 Vēl labāk ir debugot izmantojot Firebug priekš FF. Ar to varēsi ļoti labi redzēt katra elementa izmēru, paddingus un marginus. Priekš IE ir webdeveloper toolbar, bet tas nav tik labs. Link to comment Share on other sites More sharing options...
Recommended Posts