Veréis, en la web que os voy a poner tengo un problema con la página de "about_me".
Como veréis tengo 2 cosas, una imagen y un div. Yo quiero usar el float_left, para así, de esta manera poder poner una al lado del otro, pero cada vez que uso float:left, el wrapper (el fondo blanco) desaparece...
http://s310876771.mialojamiento.es/about_me.html
Código HTML:
Ver original
<!DOCTYPE html> <html> <head> <meta name="robots" content="nofollow" /> <link rel="stylesheet" type="text/css" media="screen" href="css/pratbasses.css"/> <meta name="robots" content="noindex,nofollow"> <link href='http://fonts.googleapis.com/css?family=Fondamento' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Forum' rel='stylesheet' type='text/css'> </head> <body> <header> <img src="images/logo-prat-basses.png" alt="logo-prat-basses" width="130" height="130" /> </header> <div id="wrapper"> <nav> <ul> </ul> </nav> <section id="about_me"> <img src="images/oscar-prat.jpg" alt="oscar-prat" width="250" height="327" /> <article> </article> </section> </div> <footer> </footer> </body> </html>
Código CSS:
Ver original
/***** GENERAL *****/ * { padding:0; margin:0 } html { background-color: black; font-size: 1em; background: #f0b7a1; /* Old browsers */ /* IE9 SVG, needs conditional override of 'filter' to 'none' */ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPHJhZGlhbEdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iNzUlIj4KICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiNmMGI3YTEiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzkzMTQxNCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvcmFkaWFsR3JhZGllbnQ+CiAgPHJlY3QgeD0iLTUwIiB5PSItNTAiIHdpZHRoPSIxMDEiIGhlaWdodD0iMTAxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=); background: -moz-radial-gradient(center, ellipse cover, #f0b7a1 0%, #931414 0%, #000000 100%); /* FF3.6+ */ background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#f0b7a1), color-stop(0%,#931414), color-stop(100%,#000000)); /* Chrome,Safari4+ */ background: -webkit-radial-gradient(center, ellipse cover, #f0b7a1 0%,#931414 0%,#000000 100%); /* Chrome10+,Safari5.1+ */ background: -o-radial-gradient(center, ellipse cover, #f0b7a1 0%,#931414 0%,#000000 100%); /* Opera 12+ */ background: -ms-radial-gradient(center, ellipse cover, #f0b7a1 0%,#931414 0%,#000000 100%); /* IE10+ */ background: radial-gradient(center, ellipse cover, #f0b7a1 0%,#931414 0%,#000000 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f0b7a1', endColorstr='#000000',GradientType=1 ); /* IE6-8 fallback on horizontal gradient */ } #wrapper { margin-top: 150px; margin-left: auto; margin-right: auto; width: 940px; background-color: white; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; -webkit-box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, .6); -moz-box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, .6); box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, .6); } /***** HEADER *****/ header { width: 940px; margin: 20px auto -150px auto; height: 150px; } header img { display: block; margin: auto; } /***** NAVEGACIÓ *****/ nav { float: left; width: 100%; height: 80px; -webkit-box-shadow: 0px 2px 10px 2px rgba(0, 0, 0, 0.6); -moz-box-shadow: 0px 2px 10px 2px rgba(0, 0, 0, 0.6); box-shadow: 0px 2px 10px 2px rgba(0, 0, 0, 0.6); -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; -moz-border-radius-bottomright: 0px; -moz-border-radius-bottomleft: 0px; -webkit-border-radius: 5px 5px 0px 0px; border-radius: 5px 5px 0px 0px; font-family: 'Fondamento', cursive; font-size: 1.5em; background: #c42727; /* Old browsers */ /* IE9 SVG, needs conditional override of 'filter' to 'none' */ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPHJhZGlhbEdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iNzUlIj4KICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiNjNDI3MjciIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjMjYwOTA5IiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L3JhZGlhbEdyYWRpZW50PgogIDxyZWN0IHg9Ii01MCIgeT0iLTUwIiB3aWR0aD0iMTAxIiBoZWlnaHQ9IjEwMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); background: -moz-radial-gradient(center, ellipse cover, #c42727 0%, #260909 100%); /* FF3.6+ */ background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#c42727), color-stop(100%,#260909)); /* Chrome,Safari4+ */ background: -webkit-radial-gradient(center, ellipse cover, #c42727 0%,#260909 100%); /* Chrome10+,Safari5.1+ */ background: -o-radial-gradient(center, ellipse cover, #c42727 0%,#260909 100%); /* Opera 12+ */ background: -ms-radial-gradient(center, ellipse cover, #c42727 0%,#260909 100%); /* IE10+ */ background: radial-gradient(center, ellipse cover, #c42727 0%,#260909 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#c42727', endColorstr='#260909',GradientType=1 ); /* IE6-8 fallback on horizontal gradient */ } nav ul { width: 100%; height: 80px; display: inline; list-style-type: none; padding-top: 60px; line-height: 80px; } nav ul li { display: block; } nav ul li a { float: left; text-decoration: none; width: 120px; height: 60px; text-align: center; color: #fafafa; margin-left: 55px; text-shadow: 0px 0px 3px #969696; filter: dropshadow(color=#969696, offx=0, offy=0); } nav ul li a:hover { background: #c42727; /* Old browsers */ /* IE9 SVG, needs conditional override of 'filter' to 'none' */ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPHJhZGlhbEdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iNzUlIj4KICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiNjNDI3MjciIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjM2QwZTBlIiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L3JhZGlhbEdyYWRpZW50PgogIDxyZWN0IHg9Ii01MCIgeT0iLTUwIiB3aWR0aD0iMTAxIiBoZWlnaHQ9IjEwMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); background: -moz-radial-gradient(center, ellipse cover, #c42727 0%, #3d0e0e 100%); /* FF3.6+ */ background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#c42727), color-stop(100%,#3d0e0e)); /* Chrome,Safari4+ */ background: -webkit-radial-gradient(center, ellipse cover, #c42727 0%,#3d0e0e 100%); /* Chrome10+,Safari5.1+ */ background: -o-radial-gradient(center, ellipse cover, #c42727 0%,#3d0e0e 100%); /* Opera 12+ */ background: -ms-radial-gradient(center, ellipse cover, #c42727 0%,#3d0e0e 100%); /* IE10+ */ background: radial-gradient(center, ellipse cover, #c42727 0%,#3d0e0e 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#c42727', endColorstr='#3d0e0e',GradientType=1 ); /* IE6-8 fallback on horizontal gradient */ width: 120px; height: 60px; -moz-border-radius-topleft: 0px; -moz-border-radius-topright: 0px; -moz-border-radius-bottomright: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-radius: 0px 0px 5px 5px; border-radius: 0px 0px 5px 5px; -webkit-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.6); -moz-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.6); box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.6); text-align: center; float: left; text-decoration: none; color: black; margin-left: 55px; text-shadow: 0px 0px 3px #969696; filter: dropshadow(color=#969696, offx=0, offy=0); -webkit-transition: color 0.3s ease-in-out; -moz-transition: color 0.3s ease-in-out; -o-transition: color 0.3s ease-in-out; transition: color 0.3s ease-in-out;} /***** FOOTER *****/ footer { margin: auto; width: 940px; height: 150px; text-align: center; color: white; font-family: 'Forum', cursive; } /***** ABOUT ME *****/ section#about_me img{ margin-left: 50px; margin-top: 50px; -webkit-box-shadow: 0px 0px 2px 3px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0px 0px 2px 3px rgba(0, 0, 0, 0.2); box-shadow: 0px 0px 2px 3px rgba(0, 0, 0, 0.2); } section#about_me article { width: 400px; height: 200px; border: 1px solid black; }
Muchas gracias de antemano.
Saludos!