...

View Full Version : Help with text positioning



SamuelSweis
05-08-2011, 04:59 PM
Can someone please help me position my text entitled "Latest News..." not all the way left but not center, I would like it aligned with the main picture on the site. I have uploaded two pictures, one showing the way I would like it to appear and the other showing how it is incorrectly displayed.

http://www.trillionaireme.com/images/help.jpg

http://www.trillionaireme.com/images/help2.jpg

SB65
05-08-2011, 05:59 PM
For a start, get a doctype (http://www.alistapart.com/articles/doctype/)on your page - you will struggle to get any consistency cross-browser without one.

Replace your deprecated <center> tags with <div id="wrap"> instead, and centre it with css as follows:


#wrap{
width:1000px;/*assign a width*/
margin:0 auto;/*centre the div*/
text-align:center;/*centre everything within the div*/
}

Move your "Latest news" code t o sit inside#wrap, give that code an id of "latest" and then use css to align it to the left rather than the centre:


#latest{text-align:left}

I'd also suggest replacing your deprecated <font> tags with css.

SamuelSweis
05-08-2011, 06:23 PM
Thank you for your response, and I know this is a beginner's question because I am a beginner, but where and how do I implement all those codes you just gave me? I'm not familiar with CSS or labeling new #"tags" but I am a fast learner and am eager to study.

SB65
05-08-2011, 07:01 PM
Have a look here for some basic tutorials:

http://htmldog.com/guides/htmlbeginner/

or see the sticky at the top of the page. That should help with the basic set up and how to use css - the code quoted above will form part of your css file.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum