Ver Mensaje Individual
  #3 (permalink)  
Antiguo 27/04/2009, 16:25
juandedios
 
Fecha de Ingreso: mayo-2003
Ubicación: Lima
Mensajes: 967
Antigüedad: 21 años
Puntos: 8
Respuesta: Que un div crezca de acuerdo a su contenido

Lo puse como tu dices, pero nada:

este es mi css:
Código css:
Ver original
  1. @charset "utf-8";
  2. /* CSS Document */
  3.  
  4. a {
  5.     cursor: pointer;
  6. }
  7.  
  8. html, body {
  9.     width: 100%;
  10.     height: 100%;
  11. }
  12.  
  13. body {
  14.     background-color: #F1F1F1;
  15.     font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  16.     font-size: 12px;
  17.     color: #77787A;
  18.     margin: 0 auto;
  19.     text-align: center;
  20. }
  21.  
  22. fieldset {
  23.     border: 1px solid #900;
  24.     margin-top: 30px;
  25.     padding: 20px;
  26. }
  27.  
  28. fieldset td {
  29.     padding: 2px;
  30.     font-weight: bold;
  31. }
  32.  
  33. img {
  34.     border: 0;
  35. }
  36.  
  37. label {
  38.     padding-top: 20px;
  39. }
  40.  
  41. legend {
  42.     font-size: 14px;
  43.     color: #900;
  44.     font-weight: bold;
  45. }
  46.  
  47. p {
  48.     margin-left: 20px;
  49.     padding-top: 10px;
  50. }
  51.  
  52. p, ul {
  53.     margin-top: 0px;
  54.     margin-bottom: 0px;
  55. }
  56.  
  57. ul {
  58.     margin-left: -15px;
  59. }
  60.  
  61. .a_solo a:hover {
  62.     color: #900;
  63.     text-decoration: underline;
  64. }
  65.  
  66. .cabeceracategoriaslist {
  67.     width: 189px;
  68.     height: 36px;
  69.     background: url(../img/contenedortitulochico.gif) no-repeat;
  70. }
  71.  
  72. .cabeceraderecha {
  73.     width: 181px;
  74.     height: 36px;
  75.     background: url(../img/contenedortitulochicoderecha.gif) no-repeat;
  76. }
  77.  
  78. .corte {
  79.     clear: both;
  80. }
  81.  
  82. .cuerpocategoriaslist {
  83.     width: 189px;
  84.     height: auto;
  85.     background: url(../img/cuerpochico.gif) repeat-y;
  86.     padding-top: 20px;
  87. }
  88.  
  89. .cuerpocategoriaslist li {
  90.     padding-top: 7px;
  91.     padding-bottom: 5px;
  92.     list-style: none;
  93.     background: url(../img/fondolista.gif) no-repeat;
  94.     background-position: bottom left;
  95. }
  96.  
  97. .cuerpoderecha {
  98.     width: 181px;
  99.     height: auto;
  100.     background: url(../img/cuerpochicoderecha.gif) repeat-y;
  101.     padding-top: 20px;
  102. }
  103.  
  104. .piecategoriaslist {
  105.     margin: 0 auto;
  106.     width: 189px;
  107.     height: 20px;
  108.     background: url(../img/piechico.gif) no-repeat;
  109. }
  110.  
  111. .piederecha {
  112.     margin: 0 auto;
  113.     width: 181px;
  114.     height: 40px;
  115.     background: url(../img/piechicoderecha.gif) no-repeat;
  116.     background-position: top;
  117. }
  118.  
  119. .titulito {
  120.     font-weight: bold;
  121. }
  122.  
  123. .titulitorojo {
  124.     font-weight: bold;
  125.     color: #900;
  126. }
  127.  
  128. #idioma {
  129.     width: 200px;
  130.     height: 51px;
  131.     float: right;
  132.     text-align: right;
  133.     padding-right: 20px;
  134. }
  135.  
  136. #izquierda {
  137.     position:absolute;
  138.     width: 189px;
  139.     margin-left: 20px;
  140.     text-align: left;
  141. }
  142. #centro {
  143.     position:absolute;
  144.     width: 518px;
  145.     margin-left: 229px;;
  146.     text-align: left;
  147. }
  148.  
  149. #derecha {
  150.     position: absolute;
  151.     width: 181px;
  152.     margin-left: 767px;
  153.     text-align: left;
  154. }
  155.  
  156. #logo {
  157.     width: 300px;
  158.     height: 75px;
  159.     background: url(../img/logo.gif) no-repeat;
  160.     margin-left: 20px;
  161.     margin-top: 51px;
  162. }
  163.  
  164. #menumed {
  165.     margin-top: 0px;
  166.     margin-left: 31px;
  167. }
  168.  
  169. #menumed li {
  170.     list-style: none;
  171.     float: left;
  172.     padding-left: 10px;
  173.     padding-right: 10px;
  174. }
  175.  
  176. #menumed li a {
  177.     text-decoration: none;
  178.     color: #77787A;
  179. }
  180.  
  181. #menumed li a:hover {
  182.     text-decoration: none;
  183.     color: #900;
  184. }
  185.  
  186. #menunosotros {
  187.     position: absolute;
  188.     width: auto;
  189.     height: auto;
  190.     margin-top: 44px;
  191.     margin-left: 115px;
  192.     padding: 5px;
  193.     border: 1px solid #D9D9D9;
  194.     background-color: #990;
  195.     color: #FFF;
  196.     display: none;
  197. }
  198.  
  199. #menunosotros a {
  200.     color: #FFF;
  201.     text-decoration: none;
  202.     font-weight: bold;
  203. }
  204.  
  205. #menunosotros a:hover {
  206.     color: #FFF;
  207.     text-decoration: underline;
  208.     font-weight: bold;
  209. }
  210.  
  211. #menutop {
  212.     margin-left: 20px;
  213.     padding-top: 7px;
  214. }
  215.  
  216. #menutop li {
  217.     list-style: none;
  218.     margin-top: 10px;
  219.     padding-left: 10px;
  220.     padding-right: 10px;
  221.     float: left;
  222. }
  223.  
  224. #menutop li a {
  225.     text-decoration: none;
  226.     color: #77787A;
  227.     margin: 5px;
  228.     padding: 5px;
  229.     padding-left: 10px;
  230.     padding-right: 10px;
  231.     text-align: center;
  232. }
  233.  
  234. #menutop li a:hover {
  235.     text-decoration: none;
  236.     color: #84080A;
  237.     border: 1px solid #84080A;
  238.     text-align: center;
  239. }
  240.  
  241. #pagina {
  242.     margin: 0 auto;
  243.     margin-top: 20px;
  244.     bottom: 20px;
  245.     width: 968px;
  246.     height: auto;
  247.     text-align: left;
  248. }
  249.  
  250. #cabecera {
  251.     width: 968px;
  252.     height: 179px;
  253.     background: url(../img/top.gif) no-repeat;
  254. }
  255.  
  256. #carritoinfo {
  257.     position: absolute;
  258.     width: 180px;
  259.     height: 94px;
  260.     border-left: 1px #D9D9D9 dotted;
  261.     margin-left: 750px;
  262.     margin-top: -72px;
  263.     padding-left: 20px;
  264.     text-align: right;
  265. }
  266.  
  267. #cuerpo {
  268.     width: 968px;
  269.     padding-bottom: 10px;
  270.     background: url(../img/med.gif) repeat-y;
  271. }
  272.  
  273. #pie {
  274.     width: 968px;
  275.     height: 80px;
  276.     background: url(../img/bot.gif) no-repeat;
  277.     background-position: top;
  278.     text-align: center;
  279. }
  280.  
  281. #pie a {
  282.     color: #77787A;
  283.     text-decoration: none;
  284. }
  285.  
  286. #pie a:hover {
  287.     color: #77787A;
  288.     text-decoration: underline;
  289. }
  290.  
  291. /* Para lightbox personalizado */
  292. .fondobox {
  293.     display: none;
  294.     position: fixed;
  295.     top: 0%;
  296.     left: 0%;
  297.     width: 100%;
  298.     height: 100%;
  299.     background-color: black;
  300.     z-index: 1001;
  301.     filter: alpha(opacity=80);
  302.     -moz-opacity: .80;
  303.     opacity: .80;
  304. }
  305.  
  306. .popupbox {
  307.     display: none;
  308.     position: fixed;
  309.     top: 25%;
  310.     left: 25%;
  311.     width: 50%;
  312.     height: auto;
  313.     padding: 16px;
  314.     border: 4px solid #D0D0D0;
  315.     background-color: white;
  316.     z-index: 1002;
  317.     overflow: auto;
  318.     text-align: left;
  319. }
  320.  
  321. .formcontacto {
  322.     display: none;
  323.     position: fixed;
  324.     width: 350px;
  325.     height: auto;
  326.     padding: 16px;
  327.     border: 4px solid #D0D0D0;
  328.     background-color: white;
  329.     z-index: 1002;
  330.     overflow: auto;
  331.     text-align: left;
  332. }
  333.  
  334. .titulopopup {
  335.     font-size: 18px;
  336.     color: #900;
  337.     font-weight: bold;
  338. }
  339.  
  340. #cerrarpopup {
  341.     width: 16px;
  342.     height: 16px;
  343.     float: right;
  344.     background: url(../img/cerrarpopup.gif) no-repeat;
  345.     cursor: pointer;
  346. }
  347.  
  348. #cerrarpopupcontacto {
  349.     width: 16px;
  350.     height: 16px;
  351.     float: right;
  352.     background: url(../img/cerrarpopup.gif) no-repeat;
  353.     cursor: pointer;
  354. }
  355. /**********************************************/
  356.  
  357. /* SubMenus */
  358.  
  359. #cerrarmenunosotros {
  360.     width: 16px;
  361.     height: 16px;
  362.     float: right;
  363.     background: url(../img/cerrarpopup.gif) no-repeat;
  364.     cursor: pointer;
  365. }
__________________
El aprendiz.