spuris Posted October 22, 2010 Report Share Posted October 22, 2010 Jautājums ir tāds: <div id="One"> <div id="Two"> <p>Hello</p> </div> </div> One - relative, height not set; Two - absolute, height not set; Kā panākt, lai ekrānā rādītu to Hello. Citādāk tagad tas tiek norīts. Quote Link to comment Share on other sites More sharing options...
indoom Posted October 22, 2010 Report Share Posted October 22, 2010 kādā ziņā "norīts"? Parādi visu css ruli. Varbūt z-index jāpalielina. Quote Link to comment Share on other sites More sharing options...
spuris Posted October 22, 2010 Author Report Share Posted October 22, 2010 kādā ziņā "norīts"? Parādi visu css ruli. Varbūt z-index jāpalielina. Paldies, atkodu pats! :) Nācās pārstrādāt kodu, jo atradu internetā, ka šāda kostrukcija nav iespējama - viens divs iekš cita un abiem nav height norādīts... Quote Link to comment Share on other sites More sharing options...
indoom Posted October 22, 2010 Report Share Posted October 22, 2010 Kāpēc tad nav iespējama? Ja vien nav overflow:hidden. Quote Link to comment Share on other sites More sharing options...
spuris Posted October 22, 2010 Author Report Share Posted October 22, 2010 Kāpēc tad nav iespējama? Ja vien nav overflow:hidden. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css" media="screen"> #Zero { background-color: red; height: 100px; position: relative; } #One { background-color: black; position: relative; } #Two { background-color: blue; width: 300px; height: 100px; top: 400px; left: 100px; position: absolute; } #Three { background-color: green; height: 100px; position: relative; } </style> </head> <body> <div id="Zero"></div> <div id="One"> <div id="Two"> <p>Hello!</p> </div> </div> <div id="Three"></div> </body> </html> Quote Link to comment Share on other sites More sharing options...
spuris Posted October 22, 2010 Author Report Share Posted October 22, 2010 neviens, neko? :( Quote Link to comment Share on other sites More sharing options...
indoom Posted October 25, 2010 Report Share Posted October 25, 2010 Pieliec #One z-index:1 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.