Simple CSS technique for DIY website owner

The biggest benefit of WordPress is that it can create a beautiful, beautiful, almost without coding knowledge. Fastened website. With hundreds of professional themes and flexible drag -and -drop editors, it is an excellent solution for the owner of the DIY website.

But what if you want to go further and deeper visual customs? CSS is one of the fastest ways to change the appearance of the website.

What is CSS?

CSS (Class Link Table) determines the layout and visual effects of your website -color, font, border distance, size, etc. Through some CSS basic knowledge, you can change the appearance of all pages and posts, or focus on a single part and make a one -time change.

The basic CSS syntax is shown below:

Selector {attribute: value;}

[

[ 123]

Selector

is the element you want to set style: title, paragraph, page, image, link, etc. This

attribute

is the category you want to change: for example, font color, size, border, or background. You can apply multiple attributes to each selector.

The value Definition attribute: specific color, specific font size, border width, width The exact size and so on.

Note that the format: The attributes and values \u200b\u200bare separated by the colon and included in the brackets. Follow a segment after each value.

In practice, the color of the above title (that is, \u0026 lt; h1 \u0026 gt; mark) must be changed from black to orange. You can use:

[ 123]

Selector: H1

Properties: Color

Value: Orange

]

How to css Apply to your website

To enable custom CSS, please navigate to Jetpack → Settings → Writing in the instrument panel of your website

. Roll down to the

Theme Enhancements , and then open ENHANCE CSS Customization Panel

option.

To add CSS, please turn to

appearance → custom → additional CSS Essence You can enter the actual CSS to be added here. To provide help, JetPack’s CSS editor is easier to distinguish the selectioner, attributes and values.

When adding or editing CSS, you can preview the change before preservation so that they know that they know exactly before your real -time website Appearance. Jetpack stores the latest 25 CSS revisions, so if you don’t like a new appearance, you can return to the previous design. Learn more information about using custom CSS.

Five methods to customize the website with CSS

Jetpack CSS 颜色自定义 Each item on your website has a selector, so you can use CSS to change any content. If you want to learn how to find a selectioner, this is a great tutorial -but you can now use the CSS you have provided for five changes.

Type

One of the most common CSS purposes It is the style of setting up websites or fonts. To change the color and size of the title (Title 1, Title 2, etc.) in the site, please use this code and modify the value as needed: h1 {

] Color:#ff5733;

Font size: 36px; }

The example above only modified the title 1. If you want to change the color and font size of different titles, such as the title3. Please exchange

H1

Selector with

H3

, and adjust the size and color appropriately:

] H3 { color:#ff5733; Font size: 25px;

}

H1, H3, H3, H5, H6 {

color:#ff5733;

Use the comma separator:

}

]

In order to make all the title uppercase to obtain a greater impact, please use the following command:

H1, H2, H3, H4, H5, H6 {

text conversion: uppercase;

}

Link

123]

The hyperlink should stand out from ordinary text, so that the website visitors can immediately know which texts are clicked. By editing the color and adding a lower line to make your link pop up:

(I don’t want to draw the line under the link ? Just delete the following \”Text-DECORATION: Underline;\”.)

A color:#63b892; 文字装饰:下划线; }

如果您希望您的链接在有人将鼠标悬停在它上面时改变颜色,请Add \”: HOVER\” to the selector:

1: Hanging {

Color:#ff5733;
}

]

If you use a large number of project symbols in blog articles and pages, try using a little CSS to make them in you in you Other content is more prominent.

List

To change the project symbol point into a circle and change the thickness, color and large font thickness, color and large size, color and largeSmall, please use the following code:

Jetpack CSS 自定义项目符号列表 UL {

List style type: CD;

color:#9663b8;

Font size: 25px;

Font thickness: thick body;

}

If you only want to change one of these attributes, please include only to modify you to modify you The content of the content.

Do you want more choices? CSS-Tricks.com outlines all styles of the list (such as square or image as a project symbol) and additional prompts and shortcuts.

Menu item Many themes provide multiple main menu options, so you can choose the option for your website. But what if you want to further customize the menu style?

In the example above, we use CSS to add a custom green background with the menu item, and hover the mouse in each menu in each menu. Change the text color:

.site-header .menu li: Hover {

Background:#EFF3EC;

} Jetpack CSS 自定义菜单

.site-header .menu li: Hover a {

Color: #fff;

}

The sidebar sidebar Small components

Small components on the sidebar are a good way to display useful content, so you may want them to stand out from other parts of your website. Use the following code to add a background behind the sidebar of the sidebar and add filling around the text (extra space):

.widget {

Background:#E8F2FD;

Fill: 25px;

}

123]

Apply CSS to a specific page insteadWebsite:

Navigation to the page or post you want to customize, and then single alone The

in the black bar on the top of the striker board

.

All the CSS fragments above are suitable for the entire site -they will modify these projects on each page and modify each place where they appear. What if you just want to apply CSS to a specific page or post?

WordPress allocate each page and publish a unique ID, you can find the ID in the WordPress dashboard:

editor page

In the URL bar, find content similar to \”Post \u003d 74\”. Number

However, \”74\” changes due to your posts or page ID.

Jetpack 小部件 CSS

To apply CSS to specific pages or posts, please add numbers with \”.page-id-\” together to your CSS. To change the color 1 font color on this page, you will use the following:

  1. ]
  2. .page-ID-74 H1 {
    Color:#ff5733;
  3. Font size: 36px;

}

页面上的 Jetpack CSS 自定义

Please remember: Preview is your friend! If you don’t have much experience in CSS, you may be nervous about making changes to your website. Don’t worry! When you edit, the preview of the change will be displayed in real time. Play the code and perform any editor you want. If you are satisfied with the updated CSS appearance, click

to save and publish

!

There is also a CSS historical record function, which can record the time you save changes. This means that if you change your mind, you can quickly restore the original state. For this reason, please click

at the bottom of the customizer to view the complete historical record

Other CSS resources

. Select the date and time you want to recover, and then click
to restore this version
button.

The hexadecimal code specifies the color you need to use when modifying the font or background. If you are not sure which one to use, the HTML color code provides a good solution. Explore their color selector toFind the perfect shadow, then copy and paste the hexadecimal code generated. CSS- tricks.com provides various difficult CSS code fragments from beginners to experts. You can also find tutorials, videos and guidelines to learn more.

W3SChools is a convenient CSS examples and drill resources.

WordPress.com provides information about the basic knowledge of CSS and the use of media query to set information about CSS based on specific devices. UPWork.com is a WordPress partner, which provides free experts that can help CSS projects.

Start customizing your WordPress website

The best way to learn basic CSS is to start experiments. All code listed above can be customized or adjusted to meet your needs -use it as the basis, and then start switching the color, change the font size, or make any other modification you want!

  • With the help of Jetpack custom CSS editor, with the help of preview tools and rollback functions, you can start starting Customized without worrying about destroying your website. If you need additional protection, please use Jetpack Backup to automatically backup your work in real time and include one -click recovery.

  • Learn more information about other Jetpack design functions and start using Jetpack to customize CSS.

Author:

Leave a Reply

Your email address will not be published. Required fields are marked *