English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Sorry for the silly question i'm new to html.
I want my div tag to be 20px from the top of the page.
Here's my div tag:



I tried to put in top:20px but it did not work. How can I do this? Thanks!

2007-12-14 10:43:24 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

The key command is "margin-top:20px;"

I also fixed it so you don't have to use those

tags anymore.


Hello World

2007-12-14 11:07:04 · answer #1 · answered by strantheman 2 · 1 0

You need to use margin:

#ivoog {
margin-top: 20px;
margin-left: auto;
margin-right: auto;
}

This will position your div 20px below whatever is above it, and centered.

Here's a good html/css tutorial:

http://htmldog.com

2007-12-14 10:51:28 · answer #2 · answered by daa 7 · 0 0

fedest.com, questions and answers