Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/11/2015, 19:58
Avatar de DoPeY-BBS
DoPeY-BBS
 
Fecha de Ingreso: octubre-2005
Ubicación: Santo Domingo, Dominican Republic, Dominican Republic
Mensajes: 574
Antigüedad: 18 años, 6 meses
Puntos: 12
Posiciones absolutas y relativas en html 5

Que tal, me surge una pregunta

Yo estoy tomando un curso de html y css bien bueno y en la practica final hay que hacer una de esas páginas modernas con eso que le llaman hero secciton con una imagen a la derecha y un encabezado a la izquierda junto con un texto y dos botones.

¿Es buena practica utilizar posicionamientos absolutos y relativos en html 5?

Código HTML:
<section id="hero-container">
			
			<article id="hero" class="container">
				
				<figure class="dispositivos">
					<img src="img/home-dispositivos.png" alt="Dispositivos">
				</figure>
				
				<header>
					<h2>Diseño web profesional para potenciar la imagen de tu negocio</h2>
				</header>
				<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ut massa non ipsum fermentum rhoncus non vel neque.</p>
				<a href="contacto.php" class="btn">Trabajemos juntos</a>
				<a href="portafolio.html" class="btn btn-alt">Ver portafolio</a>
				
			</article><!-- /#hero -->
			
		</section><!-- /#hero-container --> 
Código CSS:
Ver original
  1. #hero-container {
  2.     background: #f6f6f8;
  3.     padding: 5em 0 8em 0;
  4.     position: relative;
  5.     border-top: solid 0.0625rem #d7dbe6;
  6.     border-bottom: solid 0.0625rem #d7dbe6;
  7. }
  8.  
  9. #hero {
  10.     padding-right: 55%;
  11. }
  12.     #hero h2 {
  13.         color: #7e89a3;
  14.         font-weight: 300;
  15.         font-size: 2.5em;
  16.         line-height: 1.3em;
  17.         margin: 0;
  18.     }
  19.    
  20.     #hero p {
  21.         margin-top: 1em;
  22.     }
  23.    
  24.     #hero .dispositivos {
  25.         background: url(../img/home-dispositivos.png) left center no-repeat;
  26.         position: absolute;
  27.         top: 0;
  28.         right: 0;
  29.         width: 55%;
  30.         height: 100%;
  31.         margin: 0;
  32.     }
  33.    
  34.         #hero .dispositivos img {
  35.             display: none;
__________________
http://www.htmldog.com/HTML, CSS, and JavaScript,

http://tutorialphp.net/
Aprende PHP en 12 capítulos