Showing posts with label Convert HTML to Wordpress Theme. Show all posts
Showing posts with label Convert HTML to Wordpress Theme. Show all posts

Tuesday, 19 July 2016

Inducing Responsiveness To Your Images Via CSS



In this modern age world, there are a lot of techniques for building responsive images. However, the techniques are not same due to variations in browser support and complexities. One can make use of the srcset attribute, but it is a complex way of implementing responsive images as it demands several images, markups and the new HTML attributes (not well supported outside modern browsers).

There are lot of people that go for HTML to WordPress conversion so as to make intuitive websites for their business on all kinds of devices irrespective of the size and its orientation. However, in this article, we will simply work on height and width of CSS, which will further make it independent from the browsers property and thus will work on all browser and CSS. However, it will require a fluid design layout for your website. The concept behind this is to use CSS to make images a percentage length unit or any relative unit for making their width re-sizeable and give auto value to the height property.

img {
width: 100%;
height: auto;
}


What's a Responsive image ?

In order to know about a responsive image, we can take an example.

Div acts as a container of an <img> element.


HTML

<div class="container">
<img src="image01.jpg" width="960" height="640" />
</div>


The container has margins on the left and right as the container has 96% width property. The max width is of 960px so that the layout do not appears too wide on a bigger screen.

The container contains a <img> element of 100% width, so that its width so as to make the width equal to its container irrespective of the viewport's size, thus this makes this responsive. Further, set the height to auto so that the image scales in proportion to the screen.


CSS

div.container {
width: 96%;
max-width: 960px;
margin: 0 auto; /* to center the container */
}
img {
width: 100%;
height: auto;
}


The <img> element is always responsive even if we assign a fixed height and width to HTML attribute as shown in the markup (i.e. width="640", height="960"). This technique is best suited for content which has a fixed set of dimension via HTML.


Putting Responsive images in columns

In order to display more images on a small screen, we try to scooch in images in a columns. We often get to see websites which display galleries in a thumbnail on a grid style.

In order to make images responsive in columns, we only need to lessen the width property of the CSS and assign a display property value to the <img > elements.

We further have a couple of layout schemes namely: A two-columns layout and three-column image layout for images.


Two- column layout for responsive images

To get a two-column responsive layout, you need to set the width property of the CSS to 48% or nearly half of the container. Though, you might be thinking why not to 50%. The reason being that images have margins so we need to keep room for them as well.


HTML

<div class="container">
<img src="image01.jpg" width="860" height="540" />
<img src="image02.jpg" width="860" height="540" />
</div>


CSS

img {
width: 48%;
display: inline-block;
}


Three-column layout for responsive images

You need to use the very same concept in order to get a three-column layout for responsive images, all you need to do is to set the width of the container to 32%.


HTML

<div class="container">
<img src="img01.jpg" width="860" height="540" />
<img src="img02.jpg" width="860" height="540" />
<img src="img03.jpg" width="860" height="540" />
</div>

CSS

.three-columns {
width: 32%;
display: inline-block;
}


Adding Conditional breakpoints

Adding conditional breakpoints for responsive images is a good practice, and thus when the images grow smaller, the columns can merge themselves.

This can be done via media queries.

In code snippet used below, we will make images display in single column in smaller device such as smartphone, two columns on slightly bigger devices on phablets or tablets and four columns on much bigger screen such as a laptop or desktop.


HTML

<div class="container">
<img src="img01.jpg" width="860" height="540" />
<img src="img02.jpg" width="860" height="540" />
<img src="img03.jpg" width="860" height="540" />
<img src="img04.jpg" width="860" height="540" />
</div>

CSS

/* For Devices of small size (e.g. smartphones) */
img {
max-width: 100%;
display: inline-block;
}
/* For Devices of medium size (e.g. tablets) */
@media (min-width: 420px) {
img {
max-width: 48%;
}
}
/* For Devices of large size (e.g. desktops) */
@media (min-width: 760px) {
img {
max-width: 24%;
}
}


Responsive images with full width

In order to get responsive images that always remain 100% of the device size, you need to just change the container's width to 100% and simply remove it's max-width property which is 960 px by default.


.container {
width: 100%;
}
img {
width: 100%;
}


These methods were no doubt simple and easy methods to cater mobile device users, but it's pitfall is that it will always deliver images of full size irrespective of the device used by the user. The smaller devices won't be able to take the advantage of high-resolution images which are served in full dimensions, and most of the devices won't be able to open the images even.

Further, if you would wish to improve the performance of your web app by serving your images after reading the conditions ( i.e. a low resolution and a smaller images displayed on small mobile devices and likewise with other devices.), you need to program with the srcset, pictures and sizes elements.

Tuesday, 17 March 2015

Attention Grabbing PSD Flyer Templates for Your Promotional Needs

About Author: Emily Heming is a professional WordPress developer for a leading company WordPrax Ltd. She also provides HTML to WordPress theme conversion services and many more. She has served many WordPress companies helping them in developing user-friendly website. So feel free to contact her.
 

Flyers are great marketing tools that help you draw the attention of folks to whatever kind of event you have planned for them. Used for advertisement purposes, they are a perfect way to convey the benefits, products or upcoming event to your target audience. Flyers are cost-efficient choice for getting the word out and make your marketing campaigns stand out.

In this article, we are providing you with a list of some best looking PSD flyer templates that help you promote your products in the manner most effective. All of them are high in quality, professionally designed, and are great for advertisement, Christmas, Fashion Brands, Parties and more.

So, without further ado, let's have a look at them:

1. Free Halloween Party PSD Flyer Template


Give an extraordinary touch to your next Halloween event with this beautiful Halloween party template. The design of the template is very interesting and looks amazing with its carved pumpkins with evil faces on it. The skulls, flashlights, strands on the web, and the big black bat together creates a look that is perfect to enjoy a memorable Halloween day.

Not only this, but you can also change colors, text, content, images and color palette as per your choice.


2. Free Christmas Party Club PSD Flyer Template

This elegant PSD flyer is perfect for the upcoming Christmas celebration. The template is set up in 1275px x 1875px CMJN 300DP and looks highly well-organized with well coded code and layered names.


3. Excess Mondays Flyer Templates


This elegant looking flyer is a perfect choice for luxury or any other kind of high-end promotional event. This print-ready 100% CMYK / 300dp comes as PSD layered and includes both basic and advance version.


4. Disco Diva Flyer Template


Disco Diva Flyer Template is all what you need to effectively promote a joyful night dedicated to ladies. Its eye-catching pink color scheme is bursting with energy while 3D effect makes this free template an excellent choice for a female-filled event. The flyer allows you change colors, text, 3D elements to make it look more appealing for a ladies night.


5. Free NYE Flyer Template by Saltshaker911


Planning to make a thrill this new year? So, here is the free PSD flyer template for you. This classy flyer is perfect for those who are just excited to make this new year's eve truly exciting. Not only new year, but it's great for promoting birthday parties and fun-filled party nights. What is that makes this flyer stand out is the large 3D “NYE Render” on it. The 3D render is non-editable, although you can edit the title as per the event.


6. Special Guest- Free Flyer Template


Special Guest Flyer is a perfect choice for any place like night clubs, restaurants, or any kind of music venue where a special guest like DJ, pop star, rock star or a famous personality who is associated with the field of music or dance has been invited as a guest. The flyer looks well-organized and it's extremely easy to use, making it a great solution for almost any kind of event.


7. Free Styled Restaurant Flyer Template


A very professional looking template perfect for advertising your restaurant and its delicious menu. The flyer is an ideal option for promoting your hospitality business and your services in the most elegant manner.


8. Sunset Sundays Flyer Template


Although we have reached at the end of the summer, and fall is already at its peak, but we still have beaches hot out there in many parts of the world- and the flyer template has all the desired elements to make your beach parties stand out. So, make it your first choice to arrange a fun-filled party events on the terrace, gardens or beach.


9. Free Flyer Friday #16 – St Paddy’s Day Flyer Template


This freebie is awesome in the way it provides a perfect party theme options to your Irish clients on the occasion of St. Patrick’s Day. The template is fully editable and comes complete with both RGB and print-ready CMYK files.


10. Winter Wonderland Christmas Flyer


Make your this year's Christmas truly exciting with this beautiful PSD flyer. The template is an ultimate choice for X-mas themed parties, no matter whether you are organizing it in a nightclub or at your home.

Wrapping Up

So, there we have it all, choose your most loved template and make your party and business planning process easier and faster.