Ver Mensaje Individual
  #8 (permalink)  
Antiguo 13/01/2010, 20:03
jcouoh
 
Fecha de Ingreso: septiembre-2003
Ubicación: Merida, yucatan
Mensajes: 282
Antigüedad: 20 años, 8 meses
Puntos: 1
Respuesta: Centrar verticalmente y horizontalmente en un div un mensaje de php

He tratado de hacer los consejos y aun no he tenido el resultado deseado, he limpiado lo mas que pude mi codigo para que pueda ser entendido, por si me pueden orientar un poco mas:

Codigo HTML
Código HTML:
<html>
<title></title>
<head>
<link href="librerias/estilo.css" rel="stylesheet" type="text/css">



</head>
<body>
<DIV id="contenedor">
	<DIV id="portadacabecera">
		<DIV id="portadalat">

<?php

include("include/logo.php");
?>
		</DIV>
		<DIV id=portadaprinc>
			
<div class="greenBorder" style="display: table; height: 120px; width:100%; #position: relative; overflow: hidden; margin:0 

auto;">
    <div style="width:100%; #position: absolute; #top: 50%;display: table-cell; vertical-align: middle;">
      <div class="redBorder" style=" #position: relative;">

  
<?php

include("include/banner.php");
?>


	<DIV id=btx align=center style="width:100%"></DIV>

      </div>
    </div>
</div>

		</div>
	</div>

</div>
</body>
</html> 
Codigo CSS

Código HTML:
* {
	BORDER-RIGHT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 

0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; 

BORDER-LEFT: 0px; PADDING-TOP: 0px; BORDER-BOTTOM: 0px; 

outline: none;FONT: 8pt Verdana, Geneva, Arial, Helvetica, 

sans-serif;
}


BODY {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: 

#d6e7ff; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 7pt 

Verdana, Geneva, Arial, Helvetica, sans-serif; COLOR: 

#faefc5; PADDING-TOP: 0px; TEXT-ALIGN: center
}


#contenedor {
	MARGIN: auto; WIDTH: 960px; BACKGROUND-COLOR: 

#2965a5; TEXT-ALIGN: left
}
#portadacabecera {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: 

bold; FONT-SIZE: 12pt; PADDING-BOTTOM: 0px; COLOR: #333300; 

PADDING-TOP: 0px; HEIGHT: 120px; BACKGROUND-COLOR: #2965a5
}
#portadalat {
	FLOAT: left;; WIDTH: 150px; HEIGHT: 120px
}
#portadaprinc {
	FLOAT: right; COLOR: #ffffff; BACKGROUND-COLOR: 

#2965a5; TEXT-ALIGN: center; width: 790px;
}


    .greenBorder {border: 1px solid green;} /* just borders 

to see it */
    .redBorder {border: 3px solid red;}

y mi codigo Javascript:

Código HTML:

var msgArray = new Array(
"APRENDIENDO A USAR CSS",
"TECNICAS JAVASCRIPT",
"PHP, HTML, JAVA, ",
"DOMINIOS, HOSPEDAJE, DISEÑO WEB",

"email: [email protected]"
);
var speed = 50;
var cdel = 1000;
var maxfont = 20;

// Expanding and shrinking text banner Javascript
// copyright 24th July 2005, by Stephen Chapman http://javascript.about.com
// permission to use this Javascript on your web page is granted
// provided that this copyright notice is included
var x = y = 0;var msg;function start() {bnr('1');}
function bnr(dir){if (dir) {msg = msgArray[y];if (x < maxfont) {x++;setTimeout("bnr(1)",speed);}else setTimeout("bnr(0)",cdel);} else {if (x > 1) {x--;setTimeout("bnr(0)",speed);}else {setTimeout("bnr(1)",12);y++;if (y>=msgArray.length) y=0;}}document.getElementById('btx').innerHTML = msg;btx.style.fontSize=x+'px'}
window.onload = start;
Evidentemente hay algo que en Explorer 7 no pueda verse adecuadamente pues en FF si se ve tal como se necesita.

Si me pueden echar la mano, les agradecere.

JOrge
__________________
Jorge Couoh es profesor de Computo. sus sitios son: Cheap Web Hostingl y Cheap web hosting Services