Tags: kayak, menorcaexiste
Enhanced rounded images with CSS3
4 feb
As you may know border-radius can round images using CSS3. But you can enhance this feature putting that image inside a div, which will has overflow: hidden, a fixed size and border-radius instead of image.
What is the gap? This way you will be able to choose which part of image you want to see and round.
Take a look on next code.
HTML, an image of 300×300 pixels:
<div>
<img src="http://www.jordisalord.com/wp-content/uploads/2012/02/qr-jordisalord-300x300.png" alt="Jordi Salord @ Blog" />
</div>
CSS:
<style>
div.img-round {
overflow: hidden;
border-radius: 5px;
box-shadow:-1px 1px 2px #000;
height:280px;
width:280px;
}
div.img-round img {
margin-top:-10px;
margin-left:-10px;
}
</style>
The original image:

The result:
That’s all folks!
What do you think about this technique? Is there any other way to do it?
Enjoy this tip, I’ve recently used this technique to round non-editable images.
Tags: css3, html5, rounded images, web design
How to manually configure Plesk Virtual Host httpd.conf
10 ene
As you may know Plesk rewrites every apache configuration file on server. But it let’s you add some virtual host configuration inside each host directory.
You have to create httpd.conf files inside these directories:
- Domains
- /var/www/vhosts/domain.com/conf/httpd.conf
- Subdomains
- /var/www/vhosts/domain.com/subdomains/subdomain.com/conf/httpd.conf
Then, once you have finished with configuration files, you must say Plesk to reload these configurations:
- Per domain
# /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com- Global
# /usr/local/psa/admin/sbin/websrvmng -a
It is really useful to add permissions, rewrites, svn, or anything you want.
Tags: configuration, httpd, plesk, rewrite, vhost, virtual host
Ordenar portada WordPress
6 ene
Para ordenar la portada de un WordPress se debe modificar el archivo index.php del tema.
Y añadir estas tres líneas de código:
global $query_string;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts($query_string . '&order=DESC&orderby=modified&paged='.$paged);
En este ejemplo s’está ordenando por fecha de modificación de forma descendiente, en lugar de hacerlo por fecha de publicación.
Se puede aplicar a cualquier zona del blog modificando otros archivos, como por ejemplo category.php.
Más información a: How to sort WordPress posts by modified date
Tags: customization, front page, ordering, wordpress



