Home > Web Front-end > CSS Tutorial > How to move table down in css

How to move table down in css

WBOY
Release: 2021-12-03 11:45:00
Original
5652 people have browsed it

In CSS, you can use the "margin-top" attribute to move the table downwards. This attribute is used to set the top margin of the element. You only need to add "margin-top: downward movement distance" to the table element. Value;" style can increase the top margin of the table, thereby moving the table elements downward.

How to move table down in css

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

How to move the table down in css

In css, you can use the margin-top attribute to move the table down a specified distance . The following example explains how to move the table downward using css.

The example is as follows:

1. Create a new html file, named test.html, to explain how CSS makes the table move downward. Create a form for testing. Set the class attribute of the table tag to lthree. Define the style of the table through class and define its width as 280px.

How to move table down in css

2. Within the css tag, use the margin-top attribute to move the table down 120px.

How to move table down in css

Open the test.html file in the browser to check the effect.

How to move table down in css

Summary:

1. Create a table and set the class attribute of the table tag to lthree.

2. In the css tag, define the style of the table through class and define its width as 280px.

3. Within the css tag, use the margin-top attribute to move the table down 120px.

(Learning video sharing: css video tutorial)

The above is the detailed content of How to move table down in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template