Foros del Web » Creando para Internet » CSS »

Texto que sale de un div...

Estas en el tema de Texto que sale de un div... en el foro de CSS en Foros del Web. Hola, tengo el siguiente problema... Un div, adentro de él otros dos, y a su vez estos dos otros q se intercalan entre sí en ...
  #1 (permalink)  
Antiguo 31/07/2010, 15:10
Avatar de a_brillarmiamor  
Fecha de Ingreso: junio-2010
Mensajes: 26
Antigüedad: 13 años, 10 meses
Puntos: 0
Pregunta Texto que sale de un div...

Hola, tengo el siguiente problema...
Un div, adentro de él otros dos, y a su vez estos dos otros q se intercalan entre sí en una especie de lista...
Hasta ahi todo bien, el problema esta en que cada uno de estos div q se intercalan tienen 3 elementos, y uno mas q resulta ser un texto a modo de descripcion de los demas, este texto se me va del contenedor principal seria algo asi

l hola hola hola l hola hola hola hola...

yo calculo q el problema se origina porque al div que contiene el texto junto a los 3 elementos restantes lo acomode con un margin-top:(negativo)

el css es...

.destacadas .description {
float:left;
margin-left:86px;
margin-top:-48px;
width:481px;
}

Aclaro q antes no pasaba hasta que intente crear un perfil y colocando un texto sin espacios con letra O(letra o mayuscula).
Espero una soga y grax de antemano!
  #2 (permalink)  
Antiguo 31/07/2010, 18:49
Avatar de zerokilled
Javascripter
 
Fecha de Ingreso: abril-2009
Ubicación: Isla del Encanto, La Borinqueña [+>==]
Mensajes: 8.050
Antigüedad: 15 años
Puntos: 1485
Respuesta: Texto que sale de un div...

al menos el titulo es descriptivo y da una idea general de lo que sucede. pero la verdad, con la explicacion no pude entender bien como tienes estructurado los elementos. ¿puedes poner un ejemplo HTML con sus respectivo CSS? de todos modos, si crees que es el margen negativo (y que a mi entender me parece que eso es), entonces eliminalo. al darle margen negativo lo que hace es desplazarlo en la direccion contraria. por tanto, sí, debe salir de su contenedor.
__________________
la maldad es una virtud humana,
y la espiritualidad es la lucha del hombre contra su maldad.
  #3 (permalink)  
Antiguo 31/07/2010, 19:52
Avatar de a_brillarmiamor  
Fecha de Ingreso: junio-2010
Mensajes: 26
Antigüedad: 13 años, 10 meses
Puntos: 0
Pregunta Respuesta: Texto que sale de un div...

Hola zerokilled
aca te dejo el html y los css corresponientes...

<div class="destacadas-content box-content">
<div class="element">
<div class="logo">
<a href="/asas"><img title="MOUTA DESARROLLOS INFORMATICOS" alt="MOUTA DESARROLLOS INFORMATICOS" src="/userfiles/c/1/images/logomin-angelina_jolie_nuevas8.jpg"></a> </div>
<div class="title"><a href="/asas">MOUTA DESARROLLOS INFORMATICOS</a> |</div>
<div class="slogan"><a href="/asas">MOuta estsa para ayudarlo</a> |</div>

<script>
$(function(){
$('input.star1').rating({
cancel: 'Cancel1',
cancelValue: '0',
callback: function(value, link){
alert(value);
}
});
});
</script>

<div class="estrellas">
<span class="star-rating-control"><div class="rating-cancel"><a title="Cancel1">0</a></div><div class="star-rating rater-0 star1 {split:2} star-rating-applied star-rating-live star-rating-on" style="width: 8px;"><a title="1" style="margin-left: 0px;">1</a></div><div class="star-rating rater-0 star1 {split:2} star-rating-applied star-rating-live star-rating-on" style="width: 8px;"><a title="2" style="margin-left: -8px;">2</a></div><div class="star-rating rater-0 star1 {split:2} star-rating-applied star-rating-live star-rating-on" style="width: 8px;"><a title="3" style="margin-left: 0px;">3</a></div><div class="star-rating rater-0 star1 {split:2} star-rating-applied star-rating-live star-rating-on" style="width: 8px;"><a title="4" style="margin-left: -8px;">4</a></div><div class="star-rating rater-0 star1 {split:2} star-rating-applied star-rating-live star-rating-on" style="width: 8px;"><a title="5" style="margin-left: 0px;">5</a></div><div class="star-rating rater-0 star1 {split:2} star-rating-applied star-rating-live" style="width: 8px;"><a title="6" style="margin-left: -8px;">6</a></div><div class="star-rating rater-0 star1 {split:2} star-rating-applied star-rating-live" style="width: 8px;"><a title="7" style="margin-left: 0px;">7</a></div><div class="star-rating rater-0 star1 {split:2} star-rating-applied star-rating-live" style="width: 8px;"><a title="8" style="margin-left: -8px;">8</a></div><div class="star-rating rater-0 star1 {split:2} star-rating-applied star-rating-live" style="width: 8px;"><a title="9" style="margin-left: 0px;">9</a></div><div class="star-rating rater-0 star1 {split:2} star-rating-applied star-rating-live" style="width: 8px;"><a title="10" style="margin-left: -8px;">10</a></div></span><input type="radio" class="star1 {split:2} star-rating-applied" name="star1" value="1" style="display: none;">
<input type="radio" class="star1 {split:2} star-rating-applied" name="star1" value="2" style="display: none;">
<input type="radio" class="star1 {split:2} star-rating-applied" name="star1" value="3" style="display: none;">
<input type="radio" class="star1 {split:2} star-rating-applied" name="star1" value="4" style="display: none;">
<input type="radio" checked="checked" class="star1 {split:2} star-rating-applied" name="star1" value="5" style="display: none;">
<input type="radio" class="star1 {split:2} star-rating-applied" name="star1" value="6" style="display: none;">
<input type="radio" class="star1 {split:2} star-rating-applied" name="star1" value="7" style="display: none;">
<input type="radio" class="star1 {split:2} star-rating-applied" name="star1" value="8" style="display: none;">
<input type="radio" class="star1 {split:2} star-rating-applied" name="star1" value="9" style="display: none;">
<input type="radio" class="star1 {split:2} star-rating-applied" name="star1" value="10" style="display: none;">
</div>

<div class="description"></div>
</div>
<div class="element-i">
<div class="logo">
<a href="/he-gato"><img title="He gato!..." alt="He gato!..." src="/userfiles/c/3/images/logomin-logo.png"></a> </div>
<div class="title"><a href="/he-gato">He gato!...</a> |</div>

<script>
$(function(){
$('input.star2').rating({
cancel: 'Cancel2',
cancelValue: '0',
callback: function(value, link){
alert(value);
}
});
});
</script>

<div class="estrellas">
<span class="star-rating-control"><div class="rating-cancel"><a title="Cancel2">0</a></div><div class="star-rating rater-0 star2 {split:2} star-rating-applied star-rating-live star-rating-on" style="width: 8px;"><a title="1" style="margin-left: 0px;">1</a></div><div class="star-rating rater-0 star2 {split:2} star-rating-applied star-rating-live star-rating-on" style="width: 8px;"><a title="2" style="margin-left: -8px;">2</a></div><div class="star-rating rater-0 star2 {split:2} star-rating-applied star-rating-live star-rating-on" style="width: 8px;"><a title="3" style="margin-left: 0px;">3</a></div><div class="star-rating rater-0 star2 {split:2} star-rating-applied star-rating-live star-rating-on" style="width: 8px;"><a title="4" style="margin-left: -8px;">4</a></div><div class="star-rating rater-0 star2 {split:2} star-rating-applied star-rating-live star-rating-on" style="width: 8px;"><a title="5" style="margin-left: 0px;">5</a></div><div class="star-rating rater-0 star2 {split:2} star-rating-applied star-rating-live" style="width: 8px;"><a title="6" style="margin-left: -8px;">6</a></div><div class="star-rating rater-0 star2 {split:2} star-rating-applied star-rating-live" style="width: 8px;"><a title="7" style="margin-left: 0px;">7</a></div><div class="star-rating rater-0 star2 {split:2} star-rating-applied star-rating-live" style="width: 8px;"><a title="8" style="margin-left: -8px;">8</a></div><div class="star-rating rater-0 star2 {split:2} star-rating-applied star-rating-live" style="width: 8px;"><a title="9" style="margin-left: 0px;">9</a></div><div class="star-rating rater-0 star2 {split:2} star-rating-applied star-rating-live" style="width: 8px;"><a title="10" style="margin-left: -8px;">10</a></div></span><input type="radio" class="star2 {split:2} star-rating-applied" name="star2" value="1" style="display: none;">
<input type="radio" class="star2 {split:2} star-rating-applied" name="star2" value="2" style="display: none;">
<input type="radio" class="star2 {split:2} star-rating-applied" name="star2" value="3" style="display: none;">
<input type="radio" class="star2 {split:2} star-rating-applied" name="star2" value="4" style="display: none;">
<input type="radio" checked="checked" class="star2 {split:2} star-rating-applied" name="star2" value="5" style="display: none;">
<input type="radio" class="star2 {split:2} star-rating-applied" name="star2" value="6" style="display: none;">
<input type="radio" class="star2 {split:2} star-rating-applied" name="star2" value="7" style="display: none;">
<input type="radio" class="star2 {split:2} star-rating-applied" name="star2" value="8" style="display: none;">
<input type="radio" class="star2 {split:2} star-rating-applied" name="star2" value="9" style="display: none;">
<input type="radio" class="star2 {split:2} star-rating-applied" name="star2" value="10" style="display: none;">
</div>

<div class="description"></div>
</div>

css

.destacadas-content .element {
height:70px;
padding-left:7px;
padding-top:2px;
}

.destacadas-content .element-i {
background:none repeat scroll 0 0 #E6F5FA;
height:70px;
margin-bottom:5px;
padding-left:7px;
padding-top:7px;
}

.destacadas-content .element img, .destacadas-content .element-i img {
border:2px solid #333333;
float:left;
height:58px;
width:77px;
}

.destacadas-content .title {
color:#2D8BC9;
float:left;
font-weight:bold;
margin-left:5px;
}

.destacadas-content .slogan, .destacadas-content .estrellas {
color:#2D8BC9;
float:left;
margin-left:4px;
}

Mira si yo elimino el margin-top(negativo), ademas q se me rompe todo el firebug me marca el div description como el div element o element-i, nose si estara mal aplicado o tal vez faltara un div mas, pero el problema de css supongo no de html...


.destacadas-content .description {
float:left;
margin-left:86px;
margin-top:-48px;
width:481px;
  #4 (permalink)  
Antiguo 07/08/2010, 08:36
Avatar de zerokilled
Javascripter
 
Fecha de Ingreso: abril-2009
Ubicación: Isla del Encanto, La Borinqueña [+>==]
Mensajes: 8.050
Antigüedad: 15 años
Puntos: 1485
Respuesta: Texto que sale de un div...

bueno... paso a notificarte que no te he respondido antes por desanimo al no entender que es lo que me estas tratando de lograr. a continuacion te dejo una imagen de lo que veo excluyendo los scripts. ¿podrias explicar con una imagen que es lo que intentas lograr?

__________________
la maldad es una virtud humana,
y la espiritualidad es la lucha del hombre contra su maldad.

Etiquetas: sale
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:12.