Desde MODx, veo esta forma bastante simple y chula de conseguir bordes redondeados para tu web. Luego la imaginación de cada uno jugará un papel vital en el desarrollo de un sitio web.
Todo se reduce a una imagen con la forma redondeada y remarcada para el título de la caja. Y mediante 4 div le damos un aspecto muy elegante a nuestro sitio web.
Pasos
- Descargamos la imagen.
- Montamos nuestra web, añadiendo los siguiente estilos.
<style>
/* set the image to use and establish the lower-right position */
.cssbox, .cssbox_body, .cssbox_head, .cssbox_head h2 {
background: transparent url(demobox.png) no-repeat bottom right;
margin: 0;
padding: 0;
}
.cssbox {
width: 335px !important; /* intended total box width – padding-right(next) */
width: 320px; /* IE Win = width – padding */
padding-right: 15px; /* the gap on the right edge of the image (not content padding) */
margin: 20px auto; /* use to position the box */
}
/* set the top-right image */
.cssbox_head {
background-position: top right;
margin-right: -15px; /* pull the right image over on top of border */
padding-right: 40px; /* right-image-gap + right-inside padding */
}
/* set the top-left image */
.cssbox_head h2 {
background-position: top left;
margin: 0; /* reset */
border: 0; /* reset */
padding: 25px 0 15px 40px; /* padding-left = image gap + interior padding … no padding-right */
height: auto !important;
height: 1%; /* IE Holly Hack */
}
/* set the lower-left corner image */
.cssbox_body {
background-position: bottom left;
margin-right: 25px; /* interior-padding right */
padding: 15px 0 15px 40px; /* mirror .cssbox_head right/left */
}
/* Misc Text formatting */
.cssbox_head h2 {
color: white;
letter-spacing: 2px;
font-weight: bold;
font-size: 16px; /* this is tricky if box width is in ems */
text-align: center;
text-shadow: rgb(0,0,0) 0px 2px 5px; /* Safari-only, but I’m doing it just ‘cause I can */
}
.cssbox_body p {
margin: 0 0 20px;
}
.cssbox_body a, .css_body a:hover {
margin: 0 !important;
padding: 0 !important;
border: 0 !important;
text-decoration: underline;
}
code {
white-space: pre;
}
</style>
- Damos forma al panel con los div.
<div class=»cssbox»>
<div class=»cssbox_head»><h2>This is a header</h2></div>
<div class=»cssbox_body»>
<p>This is for your content.</p>
</div>
</div>
El resultado es muy majo, retocando la imagen, los estilo y contenido podemos conseguir aspectos muy conseguidos para nuestra web.
Ver ejemplo
Aclaración
La idea de este sistema es de MODx y esto es únicamente una traducción rápida del sistema.
5 comentarios, 2 referencias
+
#