wordpress - Responsive Portfolio Gallery Image Resizing -
I am creating a responsive portfolio website using WordPress I have a small issue that breaks the layout, all the images being 300px wide by 200px high means that I used the WordPress API to crop the images, if I upload a larger picture than the above mentioned dimensions Then
What is it for me that it automatically inserted Here is a sensorio: The client uploads amplitude with 300px width 210px high .. initially it is being shaped and That's why the layout is perfect, but when I change the size of the browser, the images are also resized but in relation to its "basic dimensions". So the image with the original height of 210px is that the remaining images .. And as I am floating all the images to create a 3 column layout, the difference in height breaks the layout (this big column changes below Leaving the image on the right and empty blank column.) How do I fix this problem? I had thought of using Timthumb before changing the size of all the images. So by changing the original dimension of the image on the fly, I think this is not an effective method? Any other solution to this problem? Also I do not want to use anything like jQuery Masonry because I have specific layouts to maintain. Thanks To limit the height of all the images equally You can use maximum-height rule from CSS. Example: Use% or M for height, pixels can not work even in a responsive design. add_image_size ("Portfolio", 300, 200, true);
width = "300" and
height = "200" properties for images (But the original dimensions of the image remain the same way as they are being reviewed) This is better than my work when I try to resize my browser window.
.gallery img {max-height: (some height); }
Comments
Post a Comment