All posts in Código

El -9999px ha muerto, viva el #replace

Esto es lo que hacemos desde hace diez años con los logos:

<h1>Texto del logo + a veces eslogan</h1>
<style>
                 h1
                     {
                        background: url("myimage") 0 0 no-repeat;
                         text-indent: -9999px;
                       }
</style>

Se acabó. Zeldman ha bautizado el nuevo método  que ya uso* y recomiendo con

“The Kellum Method”

El código es limpio, fácil y perfecto siempre que necesitamos que las imágenes de los logos se adapten (por cierto, ¿se habrá inventado ya algún sustituto para responsive design y media queries en castellano?).  No lo voy a usar para los H2,H3 etc, para eso ya tenemos las APIs y webkit.

#replace

 {
 text-indent: 100%;
 white-space: nowrap;
 overflow: hidden;
 }


* en todas las webs nuevas :-) 

¿Así que querías saber (casi todo) de CSS?

SEO-sanitizing a WordPress theme in 5 minutes

When you start a blog with WordPress, you get an overall good crawlability like with most blogging platforms. To get it ranked at search engines your first priority should be to introduce it to your communities acquiring some initial link love. However, those natural links come with disadvantages: canonicalization issues.

CSS RESET – ACTUALIZACIÓN FEB08

http://meyerweb.com/eric/tools/css/reset/reset.css

Continue reading →

IE8 : “browser version targeting”

Microsoft has announced that IE8 will introduce a new “browser version targeting” system that will see the browser default to rendering standards-compliant pages the same as in IE7, and will require developers to explicitly opt in to IE8′s new, Acid2-compliant rendering engine if they want it.
Furthermore, since Microsoft believes this is the best way for all browsers to move the Web forward without breaking current sites, it has implemented this opt-in mechanism in a form that all browsers can support:

When placed in the head of an HTML page, this tag will tell IE8 or later to render the page using the most advanced (and standards-compliant) rendering engine available in IE8, instead of the default, IE7-level rendering mode.
In the future, other browsers may implement this standard too, if they find it useful (more on this below):

If you wish to avoid adding a tag to all of your pages, you can instead configure your web server to send the same information as an HTTP response header, though if history is any guide, the tag will be by far the preferred mechanism.
And if you prefer the current browser behavior of always using the most standards compliant rendering available for the document’s DOCTYPE, you can use the special edge value to request that:

But Microsoft believes this is not what most people will want if they stop and think about it. Mainly, this feature is there for experimental/demo pages (such as the Acid2 test).
By requiring developers to declare when they want new browser rendering engines to kick in, Microsoft hopes to eliminate the kinds of page layout issues that plagued the release of IE7. From now on, if you write a page for a particular version of IE, it should work in all future versions of IE.
This move, if embraced by developers, would represent a fundamental shift in the role of standards on the Web. Understandably, quite a few people are upset by this”

Noscript – js deshabilitado

Para los navegadores que tienen JS deshabilitado:

corchete noscript corchete
corchete meta http-equiv=”refresh” content=”0; URL=http://www.url.com/noscript.htm” corchete
corchete / noscript corchete

La movida de las esquinas redondas

Gracias a http://www.albin.net/CSS/roundedCorners/ por compartir esto

Continue reading →