Tema: Re: reik pagalbos su CSS
Autorius: Maug Lee
Data: 2009-10-01 19:04:15
alias wrote:
> <div style="position: relative; width: 100px; height: 20px;">
>     <div style="position: absolute; left: 0; top: 0; width:
>     x%;">baras</div> <div style="position: absolute; left: 0; top: 0;
>     width: 100px;
> text-align: center;">x%</div>
> </div>

na o dar jei dar semantiškai patvarkius :)
Validus copy/paste veikiantis pavyzdys:

------------ ✂ ------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <title>Balsavimo rezultatai</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <style type="text/css" media="screen">
      body { background-color:white}
      #balsavimo-rezultatai { width:200px;}
        #balsavimo-rezultatai li { display:block; height:1em; background-color:silver }
        #balsavimo-rezultatai li span { display:block; height:1em; position:absolute; font-size:.9em }
    </style>
  </head>
  <body>
    <ul id="balsavimo-rezultatai">
      <li style="width:50%"><span>50%</span>
      <li style="width:0%"><span>0%</span>
      <li style="width:100%"><span>100%</span>
      <li style="width:4%"><span>4%</span>
      <li style="width:27%"><span>27%</span>
    </ul>
  </body>
</html>
------------ ✂ ------------


-- 
M.Lee