close

Page layout

Page layout

How to organize your webpage layout with the box template

CSS margin, frontier, and padding Properties are used on any HTML element to create a unique effect. They work together to make sure your web page is organized and presentable.

Of these three properties, the frontier The property may look more familiar as it is usually easily identified on a web page. However, using the frontier the property would not look as presentable as it would on most websites if the developer had not also changed the padding and margin Properties.

In this tutorial, you’ll learn about the box model and how each of its layers works together to organize website content.

What is the CSS box template?

The CSS box template is basically a box that encloses every HTML element. The box model consists of four layers (as you can see in the image below), and each layer has a unique purpose.

Box model

The first layer is in the center of the box model. This is the position given to each HTML element. In the picture above the auto x auto the value is currently displayed from the center position, but this value will be replaced by the width x height of each HTML element.

VIDEO OF THE DAY MAKEUSE

The padding The property is located between the HTML element and the frontier property, and the margin the property is located on the exterior side of the frontier goods. The padding and frontier properties usually do not have visible defaults for a given CSS element. However, a flaw margin the value of the property is on some HTML elements, namely the p element — which defaults to 16px on top and bottom.

Using the CSS margin property

The margin property has four sub-properties, namely high margin, right-margin, low margin, and left-margin. These properties are used individually to create the margin size on a specific side of an item, or as a group just using the shortcut margin goods.

Margin ownership structure

Selector {
margin: margin-top margin-right margin-left margin-bottom;
}

The example above represents the basic structure of the margin goods. The first value in the value stack assigned to the margin The property targets the top, the second value targets the right, the third targets the left, and the fourth targets the bottom of an item.

Related: How to Target Part of a Webpage Using CSS Selectors

Example of using the margin property

p{
margin: 20px 10px 20px 10px;
}

The above code effectively assigns a margin of 20px on top, 10px on the right, 20px on the bottom and 10px on the left of all p items on a specific web page. However, the same effect as the above code produced can be achieved with less code:

p{
margin: 20px 10px;
}

The above code will produce the same result as the previous code snippet. The first value assigned to margin the property will target the top and bottom, and the second value will target the right and left sides of all p elements on a web page.

If there is a case where the margin that should be assigned to all four sides of an HTML element is the same, you can use the following code to achieve this:

p{
margin: 20px;
}

The above code assigns a margin 20px on all four sides of the p elements on a web page.

Unpack the CSS border property

In the CSS box template, the frontier property is the third layer. As margin, the frontier The property has several sub-properties that you can use in a stack value. But, unlike the margin property, not all frontier sub-properties must be present for the frontier property to function properly. There is only one property that must be present: the border style goods.

Basic border property structure example

Selector{
border: border-style;
}

The border style The property in the example above can take the form of one of several values. For example, if you want a solid frontier around all the paragraphs on your web page, the following code may help:

p{
border: solid;
}

The frontier The property also allows a developer to target specific sides of an HTML element with the following four sub-properties:

  • border-left
  • border-right
  • high border
  • Bottom border

If there is a case where you need to place a frontier on only one side of an item, you can use the appropriate subproperty from the list above.

Unpacking the border-style property

Although not always visible, each HTML element is surrounded by the frontier goods. Your inability to see the frontier in some cases, this is because the default value of the border style the property is null. You can assign many different values ​​to the border style property, some of the most popular being:

Using the border property with a stack value

Three values ​​can be assigned to the frontier property to get a specific result. These values ​​are the border width, border style, and border color Properties. Therefore, if you want to create a solid red frontier around a paragraph that is 2px wide, the following code will accomplish this:

p{
border: 2px solid red;
}

You can also use the stack value on one side of an item by replacing the frontier in the example above with the sub property that targets the appropriate side. For example, if you want to target only the left side of all paragraphs with the same stack value above, you can simply replace “border” in the example above with the “border-left” property.

Using the CSS Padding property

CSS padding property is very similar to the margin goods. The padding the property has four sub-properties, padding above, padding-right, padding-stockings, and fill-left. You can use each sub-property individually or feed them as a stack value in the padding goods.

As margin, if only two values ​​are assigned to the padding property, the first will target the top and bottom sides of the element, and the second will target the left and right sides. If only one value is provided, all sides will have the same padding Cut.

The following three sets of code will produce the same result on all p elements on a web page.

Using four padding values

p{
padding: 20px 20px 20px 20px;
}

Using two padding values

p{
padding: 20px 20px;
}

Using a padding value

p{
padding: 20px 20px;
}

Using the CSS Box Model

Using the frontier, margin, and padding properties will help you organize your web page, regardless of the page type. Here’s how to use them in tandem:

Basic HTML document example





The Box Model



Heading One



Lorem ipsum dolor sit amet consectetur adipisicing elit.
Impedit rem recusandae id est. Rem, quod odio. Doloremque nemo libero,
fuga suscipit dignissimos soluta iusto ullam ducimus rerum labore necessitatibus facilis.
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Impedit rem recusandae id est. Rem, quod odio. Doloremque nemo libero,
fuga suscipit dignissimos soluta iusto ullam ducimus rerum labore necessitatibus facilis.




Heading Two



Lorem ipsum dolor sit amet consectetur adipisicing elit.
Impedit rem recusandae id est. Rem, quod odio. Doloremque nemo libero,
fuga suscipit dignissimos soluta iusto ullam ducimus rerum labore necessitatibus facilis.
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Impedit rem recusandae id est. Rem, quod odio. Doloremque nemo libero,
fuga suscipit dignissimos soluta iusto ullam ducimus rerum labore necessitatibus facilis.




Related: Best Sites for Quality HTML Coding Examples

The above code will produce the following output in the browser:

Basic layout of the html document

The image above shows two div elements each containing a title and a paragraph. Each div the element has a margin, frontier, and padding of 0px, width of 1042px and height of 112,438px as you can see in the box template below.

Box template of a default div

Using the frontier The property provides a clearer perspective of what is happening on the page.

Using the border property

  .box{
border: solid;
}

Using the CSS code above will produce the following output in your browser:

Using the border property

Now that the frontier The property is visible, it has a default width of 3px, as seen in the box template below.

Box template using the border property

As you can see from the box model above, the margin the property is outside frontier. Therefore, you can use it to create a space between the two div elements.

Using the margin property

        .box{
border: solid;
margin: 20px;
}

Presentation margin with the above code will create the following output in your browser:

Using the margin property

It’s a little better, isn’t it? There is sufficient space between the div elements. All sides of each div element now have a margin of 20px, as you can see in the box template below.

Box model using the margin property

You can now focus on the inside of the border, where the padding property falls into the box model.

Using the padding property

        .box{
border: solid;
margin: 20px;
padding: 10px;
}

The above code will produce the following output in your browser:

Using the padding property

As you can see in the image above, the text inside the border has now moved away from the edges due to the padding goods. The box model below shows that all the layers in the box model are now in use.

Experiment with CSS properties

You now have an understanding of the box model and how each element in it works together to achieve a specific result. You can try to assign a stack value to the frontier property and modify the frontier color to red, or you can replace the frontier property with its border-left sub-property and see what happens.

There are plenty of other CSS properties to explore, and with the CSS cheat sheet you can experiment with each one.


Screenshot of examples of CSS properties used in a code snippet
The CSS3 essential properties cheat sheet

Master essential CSS syntax with our CSS3 properties cheat sheet.

Read more


About the Author

read more
Page layout

How to Create a Custom WordPress Layout on Your Phone

WordPress puts the power of custom page building at your fingertips with its user-friendly block editor.

We’ll walk you through the typical WordPress mobile page building workflow and highlight some particularly impressionable layouts. Let’s get started.

WordPress: page creation on your phone

Download WordPress from the Apple App Store or Google Play Store. Launch the app and make sure you are on the My website tongue. Press the down The arrow to fill out a list of your sites, then touch the More top right icon for create a WordPress.com site (or sync a self-hosted site.)

From there, you can choose a homepage layout to customize. There are a number of categories to help you choose the best theme for the job, including Blogs, Professional sites, Splash pages, and more.

Image gallery (2 images)

Tap the one you find interesting, and then tap To choose to start setting up your site. Enter a domain name (WordPress will provide suggestions on available names and extensions) and select Create a site. Faucet Ended.

VIDEO OF THE DAY MAKEUSE

Related: What is a domain name?

If you want additional guided help, WordPress will walk you through the basics. Otherwise, if you’re ready to jump in and get your hands dirty, press Create a new (page with a plus sign) at the bottom right. Here you can create blog posts and site pages, meat and potatoes from any WordPress site.

Press on Site page to add a layout (choose from templates like wallet pages, In regards to sections, etc.) With a template selected, press Create a page to enter the block editor.

You have arrived on the main stage: tap on any item to customize it. Images (and some other blocks) will display a Multimedia options list, a settings gear, and positioning arrows when highlighted. To add new items, use the blue More icon at the bottom left.

Press the Following icon (three dots) at the top right to save your work, preview your page or switch between editing modes. When you are finished editing a page, tap Publish.

Selection blog post will open a seemingly simple text editor with a header field. Tap blue More lower left icon, however, and a world of content options is revealed. To integrate videos, Columns, social icons… everything you need to generate and keep site traffic.

When your blog post is ready to be published, tap Publish in the top right corner, enter the tags or categories, set the visibility and you’re good to go. If you want to schedule the publication of an article, simply set the Publication date at some point in the future and press Plan now.

Image gallery (2 images)

This is the basic WordPress mobile workflow. Now let’s take a look at a few WordPress themes for inspiration.

To download: WordPress for iPhone | Android (free)

More WordPress Themes for Web Dev Fiends

Of My website dashboard, under the Personalize header, press Themes. Tap the plus icon of any theme you want to try for size. If you like it Activate will apply the theme to your site. We’ve picked out a list of eye-catching themes to get you started.

Note: While some themes look good, keep in mind that you need to get your own images (unless you plan to stick with the default set.)

Barnsbury

Image gallery (2 images)

Barnsbury is fresh and well put together; a perfect theme for a mom-and-pop store to display their information and products. Ecommerce owners will benefit from the images and descriptions featured in the foreground.

Exford

Image gallery (2 images)

Exford is a clean, minimalist theme ideal for effectively conveying your personal or business message.

Coutoire

Image gallery (2 images)

Coutoire is an excellent choice for highlighting wallets. Aesthetic and professional, this theme is sure to impress potential employers.

Morden

Image gallery (2 images)

Morden is ideal for eye-catching images and small informational texts. Photographers and other media professionals rejoice.

Brompton

Image gallery (2 images)

Brompton is your theme if you are looking to build your brand’s authority. Ideal for medium chunks of informational text and centralized images, Brompton works well for directing readers to goods or services.

Upgrade your WordPress site with plugins

Now that you know how to create custom WordPress layouts on your phone, give WordPress plugins a boost.

WordPress is a powerful content management system, but its features are not exhaustive. This is where plugins come in and take over.


Install the WordPress plugin
What are WordPress plugins?

Want to customize your WordPress site? There is a plugin for that!

Read more


About the Author

read more
Page layout

Microsoft Edge Canary Restores Edge’s Old Two-Page Layout for PDFs

Microsoft has worked hard to improve the PDF experience for Edge users. Not too long ago, the software announced that Microsoft Edge’s PDF reader would get a two-page layout. Microsoft Edge Canary now offers a new “page view” option for opening PDF documents in a two-page view on a PC (via Reddit).

While Microsoft Edge has supported PDF documents for a long time, it only offered a limited set of features that forced users to look for alternative apps. Currently, it is only possible to view one page at a time and users must scroll down to return the pages.

With this new feature, the company wants to ensure that PDF files can be viewed without the need to use online services or third-party applications. Currently, the option is disabled by default in Canary Edge. Insiders who want to test the feature can follow the steps below to activate it.

  1. Open Microsoft Edge Canary (version Build 88.0.688.0 or later).
  2. Type edge: // flags / # edge-pdf-two-page-view in the address bar.
  3. Now use the drop-down menu to activate the “Enable two-page view for PDF” flag.
  4. Finally, restart Microsoft Edge to apply the change.

Once activated, open a PDF document in your browser, navigate to the toolbar, and click the “Page View” icon. You should now see an option to switch between single page and dual page layouts. There is also another option to display the cover page separately (depending on user preferences).

As you probably know, the two-page layout experience is nothing new, as the legacy version of Edge supported this capability. Plus, it’s already available in other Chromium-based browsers, including Google Chrome. The latest addition should be useful for Microsoft Edge users who often need to use PDF editing tools in the new Edge browser. Do you think you can benefit from this feature? Sound off in the comments below.

Share this post:

read more
Page layout

Google’s Mueller clarifies layout algorithm

Google’s John Mueller recently clarified in a tweet that Google’s layout algorithm is generally not about ad count. This is a more detailed explanation that improves on eight years of SEO advice on the layout algorithm.

Background information:
What is the layout algorithm?

This is a brief explanation of the algorithm.

The SEO community correctly interpreted the layout algorithm as penalizing websites that had too many ads above the waterline. This is what the advice from Google has focused on.

Google’s page layout algorithm announcement in January 2012 read:

“Rather than scrolling the page in front of a multitude of ads, people want to see the content immediately.

… If you click on a website and the part of the website you see first does not have a lot of content visible above the waterline or devotes a large portion of the initial site screen to ads , it’s not very good user experience. Such sites may not rank as high in the future. “

Advertising

Continue reading below

This statement emphasizes advertisements and was preceded by the following:

“… we’ve heard complaints from users that if they click on a result and it’s hard to find the actual content, they’re not happy with the experience. “

The normal amount of ads is correct

Immediately thereafter, Google recognizes that it is acceptable to serve ads above the waterline.

“We understand that placing ads above the waterline is quite common for many websites; these ads often work well and help publishers monetize online content.

This algorithmic change does not affect sites that place ads above the waterline to a normal degree, but does affect sites that go much further to load the top of the page with ads to an excessive or excessive degree. that make it difficult to find the actual original content on the page. “

This statement does not give a specific number of ads that could cause an algorithmic problem. It simply indicates that a “normal degree” of ads above the fold is fine.

Advertising

Continue reading below

Some people may need the definition of “normal” to be clarified for them.

But I think most people can tell the difference between what is normal and what is excessive.

Content visibility above the fold

John Mueller’s tweet was made in response to a question about the actual number of acceptable ads above the waterline.

John Mueller tweeted his response:

Mueller’s answer gives a further nuance to our understanding of the layout algorithm. According to John, Google’s layout algorithm is generally less about the number of ads and more about the difficulty of finding the content that users expect to see.

“It’s usually not a question of the number of ads, but rather how well people find the content they are looking for (what was ‘promised’ in search) when they visit a page. “

What Mueller seems to be saying is that the algorithm doesn’t necessarily count the number of ads, but rather examines how difficult it is to find the content that users expect to see.

This way of explaining the layout algorithm fits perfectly with the purpose of Google’s original ad regarding this algorithm, especially when it explains:

“… we’ve heard complaints from users that if they click on a result and it’s hard to find the actual content, they’re not happy with the experience. “

Advertising

Continue reading below

Going forward, it’s probably best to focus less on the number of ads at the top of the webpage and more on how easy it is for users to access content.

Related: Bad ad usage practices that can hurt your SEO

Is Google cryptic and ambiguous?

I’m sure there will be some who go on to say that the layout algorithm advice is cryptic and ambiguous. Many would prefer a simple statement that X amount of ads occupying X percentage of pixel space is the line not to cross.

There is nothing ambiguous in the advice so as not to make it difficult to find the content. My opinion is that if a person thinks it is ambiguous then maybe search marketing is not the right solution for that person.

SEO is rarely black and white

The SEO community likes to add hard numbers to algorithms. They therefore recommend strategies based on percentages, such as the percentage of anchor text that equates to a “natural” distribution of backlinks or a percentage of keywords on a webpage to avoid over-optimization.

Advertising

Continue reading below

The problem is, what isn’t natural in one industry is perfectly natural in another. In any case, percentages and numbers are almost always guesswork or based on correlation studies that are inherently untrustworthy.

Many times SEO is all about taking all the available information you have and making your best guess.

As much as we try to create best practices, we have to recognize that there is a lot of gray between black and white from what we know about Google algorithms.

And that’s okay because most things in life are like that.

Quotes:
Google’s layout algorithm

read more
Page layout

Using layout features for professional results

Word can create a professional looking newsletter using the page layout features and other tips. Here is an example for you to try out the tools:

The initial setup

1. Open a new document.

2. Go to Layout > Layout, click it Cut button and choose Legal 8.5 “x 14” from the drop-down list.

3. From the same location, click on the button. Orientation button and select Countryside from the drop-down list.

4. Then click on the Seen tab and choose the A page button so you can see the entire page.

5. From the same location, click on the button. Columns button and choose Two columns from the drop-down list. Since we plan to fold this page in half, this option actually gives us four pages.

JD Sartain

Define the format, orientation and columns of the paper

Return to Normal (100%) seen. Then add generic text to this newsletter.

6. Press Ctrl + Home to position your cursor at the start of the document.

7. Type = Rand (30.6) in the home position, then press the Enter key. (Note: As soon as you press the Enter key, the text falls). The first number is equal to the number of paragraphs (30) and the second number determines the number of sentences in each paragraph (6). This should be enough to create a sample newsletter. Otherwise, you can always edit it or add more.

To note: If you prefer Latin, type = Lorem (30.6), then press the Enter key.

02 use random text command to enter test data JD Sartain

Use the Random Text command to enter test data.

To help! = Rand () and = Lorem () do not work!

If you entered one of the random text commands followed by the Enter key and nothing happened, one of your autocorrect options needs to be changed.

1. Select To file > Options > Proofing.

2. When the Format the screen appears, click on the Auto correction options button.

3. Under the Autocorrect tab, scroll to the middle of the dialog screen and check the box next to the phrase Replace text as you type. Click on Okay, and the dialog screen closes. Click on Okay again, and the Options the screen closes.

03 change auto correction options JD Sartain

Change the auto correction options.

4. Return to the random text control, click the button. To finish to go to the end of the command, then press the Enter key and the text fills.

Layout

Note that the margins are too large and the gutter (where the page folds in half) is too small. Here’s how to fix it.

1. Go to Layout > Layout, click on the Margins , then scroll to the bottom of the drop-down list and click Custom Margins.

2. Under the Margins tab, note that the margins are set to Word’s defaults: Top, Bottom, Left, and Right set to one inch, Gutter set to zero, and Gutter position set to Left. Before you can change these settings correctly, you must first change the Multiple Pages setting (under Pages) at the book fold. This changes the margin options. Just click on the arrow next to Multiple pages field and select Book fold from the list.

3. Go to the next field, Sheets per booklet, and choose 4 (or as many pages as needed) from the drop-down list. You can also select All and let Microsoft do the final tally for you.

4. Note that the position of the top, bottom, gutter and gutter are the same (although Position of the gutter is grayed out), but Left and Right have become Interior and Exterior. Set the top, inside and outside to 0.65; set the bottom to 0.75; and set the gutter to 0.5 ″. Note the preview image of your document at the bottom of the dialog window. When you change the options, it reflects your changes. Click on Okay.

Note: The space margin between pages is the size of the gutter plus the inside (combined) margin.

04 set the margins of multiple pages and booklet sheets JD Sartain

Define margins, multiple pages, and a booklet sheet.

5. Now back to the document and – oops, something’s wrong. It looks okay on the preview, but the actual document is crooked because the default is set to start on an odd page. Click it Disposition tab on the Layout screen and under Section > Beginning of the section, Choose Even page from the drop-down list.

6. Then choose Insert > Footer. Scroll down and select a footer for the left and right pages.

7. With the footer guides still active / displayed (in Design mode), position your cursor on the left (even) page. Select the Page number button and choose Bottom of the page from the drop-down list. Scroll through the list of page number templates and choose one that displays the page number on the outside of the left page. Do the same for the right (odd) page.

8. Your document should now display pages 2 and 3 on the current screen, and pages 4 and 1 on the next screen (if not, you can make the setting when you print the newsletter).

05 insert footers and page numbers JD Sartain

Include footers and page numbers.

Insert captions and format graphics

Once you’ve inserted all of your stories / articles, it’s time to go back and place your charts, tables, and photos. Standard practice is at least one photo per story, but it’s not set in stone. The idea is to divide the text with graphic elements and try to balance the text, images and white space. Search online for “Newspaper Layout” under “Pictures” and you’ll discover hundreds of great ideas.

Design and layout are beyond the scope of this article; however, the instructions below explain how to insert and format graphics.

1. Place your cursor at the start of the second paragraph.

2. Select Insert > Photo. When the Insert picture dialog window will open, navigate to the applicable image, select that image, and click the button Insert button. Note that Word sizes the image to fit in the selected column.

06 insert an image from the ribbon menu JD Sartain

Insert an image in the Ribbon menu.

3. Place your cursor over the photo and click the right mouse button. To select insert Caption from the context menu. It is a lot easier if you enter the caption before choosing / setting Borders and shading Where Format image.

4. Under Options, select Figure, Equation, Where Table from the list menu.

5. Under Legend, enter a few words or a phrase to describe the image.

6. In the Position field, choose Above the selected item Where Below the selected item.

7. Click on the Numbering if you want to change the format of numbers in figures, tables or equations. For example, Figure IV (Roman numerals), Equation B (letters), Table A-7 (alphanumeric), etc.

8. When finished, click Okay.

07 insert a caption JD Sartain

insert Caption

9. Place your cursor over the photo again and click the right mouse button again. To select Format image from the context menu.

10. If you want to modify the properties of the image, click on the button. Format tab in the Format image dialogue window.

11. For Wrapping Style, choose the Greenhouse button. For horizontal alignment, choose the Left button.

08 format image packaging style alignment JD Sartain

Picture format: dress-up style and alignment

12. Click on the Advanced to display additional layout options, such as advanced image positioning and text wrapping.

13. Click on the Photo tab if you want to crop the image or change the color, brightness or contrast.

14. Click on the Cut tab if you want to change the height, width or rotation, or resize the image based on percentages.

09 modify the attributes of the image size alt text and colors JD Sartain

Change the image attributes, size, alt text, and colors.

15. The Alternative text The tab is used for websites, to enter an alternate text description (in case the image does not appear online).

16. The Colors The tab is used to define fill and line colors (and / or arrows) for graphic elements such as illustrations, tables, charts, etc.

17. Go through each of these dialog windows and test the different features. When you are finished, click Okay.

18. Note that the image has sizing handles. Grab the handle at the bottom right and stretch the image down and to the right until it extends halfway through the second column. Notice how the text automatically wraps perfectly around the photo.

You are almost done. Insert the rest of your graphics, add your headlines, logo and captions, then print the newsletter and pass it around.

10 Use the sizing handles to change the image size, then watch the text wrap around the photo JD Sartain

Use the sizing handles to edit the image, then watch the text wrap around the photo.

read more