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

in my website i have a long paragraph i wrote and its centered. it takes up 3 lines on my screen here but i wish it wouldnt go to the very left side and right side. some how make it 4 or 5 lines but have it in the middle of the page with about 2 inches of blank space on each side.. any ideas, i do understand html so ill catch on to what your saying.. thanks

2007-03-31 06:39:51 · 4 answers · asked by jde2399 1 in Computers & Internet Programming & Design

4 answers

put your paragraph inside a

tag and change it's margins... that's it.

Do you believe that the following code will solve your problem ?

Your paragraph


make sure that you have both margins have the same value, or otherwise the paragraph will not be centered.

2007-03-31 06:52:16 · answer #1 · answered by Naveen 2 · 0 0

If you use a style to set a width, margin:auto will center the element. For example,

[five lines of text goes here]



You can define width in px (pixels) or ems also.

EDIT: Oops, Peter pan is right. Use

2007-03-31 14:11:38 · answer #2 · answered by injanier 7 · 0 0

!!!!!!!!!!!!!!!!!!!!!NOTE: The & symbol and the nbsp; should be together in order for the code to work !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

You could use this code:
& nbsp;

The code: & nbsp; equals one space.

So, here's an example HTML code using the & nbsp; code:

"http://www.yahoo.com"
Hello and welcome to Yahoo.com!

                  Need some questions answered? Want to answer some questions? Visit answers.yahoo.com to get started



Visit http://www.w3schools.com/ if you need some more questions answered about HTML.

2007-04-02 21:49:14 · answer #3 · answered by halongw77 1 · 0 0

injanier, remember that margin:auto won't work on IE!!

*******
font face?? center?? that's deprecated tags!! that's what you teach??

2007-03-31 14:33:23 · answer #4 · answered by Peter pan 6 · 0 0

fedest.com, questions and answers