Jump to content

Duda con jquery....


Recommended Posts

Hola a todos.

 

resulta que estoy aplicando resizable a un div, tal como aparece aquí http://docs.jquery.com/UI/Resizable pero el problema es que dentro de ese div hay texto.. y cuando redimencionó el div el texto no se agranda.

 

pues justamente necesito que al redimencionar el div el texto que contiene el div también se re dimensione

 

Saludos. :)

Link to comment
Share on other sites

Tal vez estas incluyendo algo mas o problemas con tu CSS, yo acabo de probar el ejemplo que muestras tu en Chrome y me funciona bien.

 

<!DOCTYPE html>
<html>
<head>
  <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
  <style type="text/css">
    #resizable { width: 100px; height: 100px; background: silver; }
  </style>
  <script>
  $(document).ready(function() {
    $("#resizable").resizable();
  });
  </script>
</head>
<body style="font-size:62.5%;">
  
<div id="resizable">
<p>Enable any DOM element to be resizable. With the cursor grab the right or bottom border and drag to the desired width or height.</p>
<p>Enable any DOM element to be resizable. With the cursor grab the right or bottom border and drag to the desired width or height.</p>
</div>

</body>
</html>

 

Probe con ese codigo.. que es el mismo del demo de la pagina de jquery solo que le agregue texto al div y se me redimenciona

Link to comment
Share on other sites

tu cuando cambias el valor del tamaño del div. lo unico que logras es aumentar el tamaño de ese "bloque" y nada mas, su contenido no se agrandara, por lo que debes agrandar su contenido tambien, es decir, para agrandar todo un div no basta con agrandar el div, debes agrandar todo el contenido tambien y eso se logra manejando estilos...

 

Saludos

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...