Text wont align

This is a discussion on "Text wont align" within the Web Page Design section. This forum, and the thread "Text wont align are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jan 17th, 2008, 18:59
Junior Member
Join Date: Dec 2007
Location: Minnesota
Age: 25
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Text wont align

Im putting our address on our website and for some reason it wont align.
Ive tried text align, ive tried regular <p align="center">
. I aligned the Heading, that was no problem, but the text wont align.

here is the code

<html>
<h2 align="center">Contact Us</h2>
<address style="color:black">
<strong>000000000000<br>
0000000000000000000<br>
0000000000000000000<br>
0000000000000000000<br>
Fax: 000000000000000<br>
<a href="mailto:exampleexample">Email Us : bobthebuilderexample</a><br>
</address>
</html>

I cant see where Ive gone wrong with it.
Im confused lol.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jan 17th, 2008, 20:04
Aso's Avatar
Aso Aso is offline
Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,341
Blog Entries: 2
Thanks: 11
Thanked 49 Times in 46 Posts
Re: Text wont align

Use

Code: Select all
<address style="text-align:center">
In fact, you should use that for your <h2> tag too (instead of align="center")

HTH
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jan 18th, 2008, 04:01
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Text wont align

Why don't you do it in the proper CSS way:
HTML: Select all
<head>
<style type="text/css">
#add {
    text-align: center;
    font-weight: bold;
}
</style>
</head>
HTML: Select all
<body>
<h2 align="center">Contact Us</h2>
<address id="add">
000000000000<br>
0000000000000000000<br>
0000000000000000000<br>
0000000000000000000<br>
Fax: 000000000000000<br>
<a href="mailto:exampleexample">Email Us : bobthebuilderexample</a><br>
</address>
</body>
You could give your <h2> and <a href> a CSS class as well...
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jan 18th, 2008, 13:07
Emzi's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Manchester
Age: 25
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Text wont align

You could do what Monie said, but instead of putting the H2 tag before the DIV, put it inside that DIV, that way you don't have to apply a style on it as it will use the DIV's style.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Jan 21st, 2008, 03:06
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Text wont align

Yes you may do that.. and you have to style the h2 tag as well..
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Jan 21st, 2008, 07:52
Emzi's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Manchester
Age: 25
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Text wont align

Quote:
Originally Posted by Monie View Post
Yes you may do that.. and you have to style the h2 tag as well..
Do you? Obviously you will if you want to change the font size etc. of the h2 tag, but if the h2 tag is inside a DIV that has "text-align: center" applied to its style, then everything in that DIV will be centered, so there's no need to apply "text-align:center" to the h2 tag.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Jan 21st, 2008, 08:16
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Text wont align

He don't have any div in his code

My code ^ will center the address according to the <address id="add">
I guess what you mean is for him to wrap the address tag with a <div> with the {text-align: center} style

Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Jan 21st, 2008, 08:30
Emzi's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Manchester
Age: 25
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Text wont align

Quote:
Originally Posted by Monie View Post
He don't have any div in his code

My code ^ will center the address according to the <address id="add">
I guess what you mean is for him to wrap the address tag with a <div> with the {text-align: center} style


Ah yes, I see what you mean. I thought the <address> part was a DIV. Oopsies
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vertical Text Align Biddlesby Web Page Design 1 Mar 13th, 2008 22:39
Drop down menu alignment problems. Div wont vertically align. Itsumishi Web Page Design 7 Mar 4th, 2008 04:57
Align text vertically in a box josoap Web Page Design 3 Jul 12th, 2007 17:29
Text-Align Marc Web Page Design 11 Jun 1st, 2007 07:22
help with text-align: center iemerick Web Page Design 1 Jun 9th, 2005 18:05


All times are GMT. The time now is 22:55.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42