centering text in the middle of a page (html/css)

Status
Not open for further replies.

ubaidabcd

Banned
Dec 12, 2006
1,030
7
0
I have a webpage with an article on there, and there is a header at the top which is centered in the middle.

I'd like the text to start where the header is at.

I've tried using the indent feature in frontpage and it looks fine on a CRT monitor but on a wide screen monitor the indent starts way before the header image.


Thanks
 


huh? you have 960 posts and your asking how to center text?

and your using frontpage?

and on a crt monitor??


LMAO im calling the banhammer on this one :P
 
yeah I know, I just don't know much html, should I get dreamweaver instead? and I'm not talking about the centering as the alignment where you just highlight text and click the center button on the toolbar since I don't want that kind of centering since every line of the text won't start at the same place.
 
so far the only I can figure out is through drawing tables, i'll probably work on that tomorrow unless somebody has a simpler solution


thanks
 
You can use frontpage on a CRT monitor and still get exactly what you are looking for. I use MSexpression (the later version of FP) and I get the results that I want.. You need to start experimenting with tables for layout. Start looking at web-design more scientifically.

#1 - change your resolution to 1024 by 786 before you start designing unless your site is targeted towards tech-retarded people.
#2 - Sketch your web-site template on a piece of notebook paper and define in pixels exactly where you want everything to go, keeping in mind that some people use 800 by 600. This means even know you are designing in 1024 by 786 you still want to keep your text within the 800 pixels and DEFINITIVELY keep your call to action above the 600px mark.
#3 - use frontpage and before you start designing setup all of your tables and cells (right click and hit properties) to the pixels that you have figured out in your sketch.

When I started I was an html idiot so don't feel bad. There is an AWESOME guide to logo design and website design in this thread:
http://www.wickedfire.com/design-de...webdesign-development-tutorial-check-out.html


I never had an interest in coding HTML(although I can code a page by hand) when I can use a WYSIWYG editor to do it faster than I could code, so I ignored the last section of the guide above and setup my page in MS Expression(use front page), with tables and what not.

Anyways.. here is a concise answer to your exact question..

If you want the header centered and the text to align with it do this:
Setup a table in frontpage 2 rows by 1 column.. make sure to set the alignment to center on the table and set the width of the table to the width of the header. Put your header in cell 1,1 and put your article in cell 1,2. Easy as sunday morning.

Yes Jelf, the post does seem a little questionable and probably should be in the newbie section.. no offense UB
 
Here are some of the ways to do this.
<h1>Non-centered Header</h1>

<div style="text-align: center">
<h1>Centered Header</h1>
</div>

<h1 align=center>Another Centered Header</h1>

<h1 style="text-align: center">Yet Another Centered Header</h1>
 
so far the only I can figure out is through drawing tables, i'll probably work on that tomorrow unless somebody has a simpler solution

BTW: Tables are the most simple solution
 
Thanks for all the help, and I'll check out that link - dubber. I have a bad learning curve but, this is something I need to get further into.

yeah I just used tables, was really easy, just had to draw the tables didnt have to setup columns, rows, etc..

I didnt know I should've posted in noob forum, just thought this was where all design/html related stuff goes. Maybe a mod can movie it.

Thanks
 
Hey your question got answered and I think everyone respects your # of posts(atleast I do), so all is good. UB - Einstein had a bad learning curve in math, but after he assimilated the information in his own time he became a absolute master...
 
Status
Not open for further replies.