How to expand the page in WordPress. WordPress Theme Width Change
Often, when selecting a WordPress template, a problem occurs is an insufficient block width. Many immediately occur the desire to change the width of the template. For those who are well versed in HTML or PHP, it will not create special problems. But in order to write in detail how to make changes in the size of the WordPress template for an unprepared person, you will need a whole brochure.
The simplest thing is to order, but the one who is trying to do it independently receives knowledge. In the future, he does not have to contact specialists for each little things. Knowing the "basis" to make it quite possible. Before starting, any changes, be sure to make a spare copy of all pages of your resource. In case of inaccurate work, you can easily restore the initial site of the site.
WordPress templates are an incredible set, they are all different and everyone changes in their own way. But such basic blocks like: the width of the main page, the hat, the left and right column, the basement have everything. To work, we will need:
- Web browser Mozilla Firefox..
- Firebug plugin installed on Firefox.
When everything you need downloaded, installed and ready to work, open the selected template in Mozilla Firefox and run Firebug by pressing the beetle icon.
Plain panel
Downstairs the plugin panel is opening in which we will work. All made changes will immediately be displayed at the top of the monitor. On the right tab, we see CSS the style of the selected item, on the left hTML code pages. To increase or decrease the width of the template, the first thing we need to find out the current base size. Click on the cursor icon of our plugin.
Elements on the page will be highlighted by different colors, and you can highlight each page element, familiar with the structure of your site. Getting a name, learn exact dimensions. After the current width is installed, the left mouse button is pressed to this value. We create the most appropriate width and test, its display.
You can safely experiment with any items and values. Current changes can not affect your page on the server, they are active only in the plug-in window (current mazyl cache). When updating, all settings are reset.
Rules style.css
Now it remains to save these changes for WordPress template. Typically, the template width is prescribed in style.css. We enter the administrative panel of the website → Appearance → Editor → STYLE.CSS → Row 79, change the value width. We save.
Some wordPress templates Pretty narrow in the side menu, the so-called sidbar, or vice versa narrow in the section of articles and naturally some webmasters need to expand certain borders, for example, the banner accompanied. In this article, I will tell you how change the sizes of the header, template, partition of articles or side menu.
For which it may be necessary to change the size of the template.
The size of the template you may want to change both at the very beginning, as soon as installed and after they wrote a number of articles and you began to appear the first dozens of visitors. For example, I needed to expand the template after I wanted to try to earn the first couple of cents on advertising from my work - a blog. For these purposes the system was selected banner advertising from Google- Adsense. But in order to earn at least the unfortunate two cents need to take into account two parameters:
- To someone clicked on advertising, it is necessary for the banner that the system will be issued in certain places. On the Internet they write that this is the left slider, there are a square banner, and three times inside the article. At the very top, in the center, after some kind of header, and at the very end. Such a location will be ideal for people click on the banner. Of course there are also other options, for example in the pictures, but we do not consider them within this article.
- Google issues a banner of certain sizes.
those. We need to combine the first and second item, namely, to make the banner from Google or Yandex to be placed in the place allocated for this, left Sidebar and in articles. Since my template was too narrow for these purposes, and the small banner hang out does not make sense, because nobody will not be on them, then only one thing remains - stretch sidebar and section of articles.
How to increase the pattern horizontally part 1, we understand the numbers
To understand how much it is necessary, we need to increase the width of one or another item. We need not to threaten at the glance "enough centimeter there, and half a centimeter there", and learn these numbers exactly in pixels. Almost any browser will help us in this, for example:
- Safari.
- Firefox.
- Google Chrome.
Personally, I will show on the example of Safari, and you are on any browser convenient for you. Differences should only be in one button.
So, the base is our site size consists of 4 elements, the size of the template itself, the page size, the size of the article block and the left menu unit. Will we all take turns, do not worry, it is not scary.
To change the width of the left menu.
In this case, you can change both pixels, as we did in paragraph 3-5 and the percentage on the page. To do this, it is enough to change the parameter instead of pixels
1 | width: 31.8%; |
These values \u200b\u200bmean how many percent of the width can be occupied by one or another element. The main thing is that in the amount of Sidebar and the article occupied 100%, and not more, otherwise you will be swollen on the page.
That's all. Now we know what values \u200b\u200bwe need to change, so that everything is in bulk. It remains small, to make the necessary data in the style file.
How to enlarge the horizontal pattern part 2, change the width
After we understand the numbers, and recorded them somewhere on the leaves, let's now change them for everyone, and not just for yourself. For this:
- Go to FTP to the site
- Find and copy to your computer / WP-Content / Themes / Your Theme / Style.css
- Make a backup of this file, i.e. Copy it to my documents folder. To make two copies of the file, one over which we will work, the second that we will not touch. The second serves in case if we change something wrong and forget that.
- Open the file in a convenient editor. Now we have a pretty simple task to change the old values \u200b\u200bto new ones. There are two ways, the first light second is heavy. The first is searching for the old value and write a new one instead. The second way - we are looking for the name of the styles, inside the styles looking for the width and change the value.
Personally, I chose the first one for myself, an easy way, since it allows you to make changes literally in a couple of seconds. So, we are looking for a value of 980. The search for the file was given only two parameters that I need to change.
The first one is responsible for the width of the site:
1 2 3 4 5 6 7 8 | #page (Min- Height: 100px; Clear: Both; width: 96%; padding: 0; padding- top: 24px; max- width: 980px; overflow: hidden; |
#page (min-height: 100px; Clear: Both; width: 96%; padding: 0; Padding-top: 24px; max-width: 980px; overflow: hidden;
The second is the width of two elements, the list of articles, and the left menu:
1 2 3 4 5 6 7 8 9 10 11 | . Main- Container (width: 980px; margin: 0 auto; overflow: hidden; padding: 0; background: #FFF; Position: relative; - WebKit- Box - Shadow: 0px 0px 10px RGBA (50, 50, 50, 0.17) ; - Moz- Box- Shadow: 0px 0px 10px RGBA (50, 50, 50, 0.17); Box- Shadow: 0px 0px 10px RGBA (50, 50, 50, 0.17);) |
Main-Container (width: 980px; margin: 0 auto; overflow: hidden; padding: 0; background: #FFF; Position: relative; -Webkit-Box-Shadow: 0px 0px 10px RGBA (50, 50, 50, 0.17) ; -Moz-Box-Shadow: 0px 0px 10px RGBA (50, 50, 50, 0.17); Box-Shadow: 0px 0px 10px RGBA (50, 50, 50, 0.17);)
All that we have remained to change the values \u200b\u200bof 980 to 1080 and download back.
That's all, but if you have some questions, write in the comments, or I will be glad to help you.
It often happens that the topic you like has a narrow area for recordings and in its settings does not provide a change in the width. In this case, it can be increased, with minimal knowledge HTML. and CSS. . For example, we use the popular, free Patagonia theme. You can expand the topic with the help of a wonderful plugin Firefox.— Firebug.. First, it should be installed by downloading from here. Then turn on plugin., as it shown on the picture - Tool tab — Web development — Firebug. — open Firebug.:
After that, at the bottom of the screen, it is necessary, tipping the cursor and click the mouse, choose different elements. At the same time, on the right side, will be displayed. styles CSS., and in the page of the page, this or that region will be highlighted - the main one sidebar, header.. We are also interested in the main area on which we will fall when "will come out" by tag For instance, running width The main area with 550 pixels, up to 620. To do this, you need to make changes to the string width: 550px File style.css.. If the topic is already installed, you can edit this file, directly from the admin, if not, you must unpack the archive with the topic and make changes to the file using the editor. In our case, the topic is installed, so we go into adminca— Appearance
— Editor - Open the STYLE.CSS file, we find the Width: 550px string and change the value of the 550px width to 620px. Zhmem. Update file.. We go to the site and see that the area of \u200b\u200bthe posts expanded, but in places "hit" on the right column. In this case, we need to proportionally narrow this area. For this we will also use plugin Firebug., as in the previous case. Find tag.