944,081 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2116
  • PHP RSS
Feb 1st, 2005
0

html question

Expand Post »
i didn't see any html forums so I'm posting this here... what should we use in place of the align tag since it has been deprecated?

i know it has been replaced with css, so how would i convert the following two tags?
<p align="center"> </p>
<td align="center"> </td>
Similar Threads
Reputation Points: 13
Solved Threads: 4
Posting Whiz
paradox814 is offline Offline
351 posts
since Oct 2004
Feb 1st, 2005
0

Re: html question

Quote originally posted by paradox814 ...
i didn't see any html forums so I'm posting this here... what should we use in place of the align tag since it has been deprecated?

i know it has been replaced with css, so how would i convert the following two tags?
<p align="center"> </p>
<td align="center"> </td>
You mean like this example?
[PHP] <div align="center"></div>[/PHP]

or

[PHP]<table width="50%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>[/PHP]
Reputation Points: 16
Solved Threads: 3
Junior Poster
mikeSQL is offline Offline
196 posts
since Dec 2004
Feb 1st, 2005
0

Re: html question

Maybe you just need to be alittle more specific. I dunno, its probly just me without coffee today. LOL, let me get some real quick!
Reputation Points: 16
Solved Threads: 3
Junior Poster
mikeSQL is offline Offline
196 posts
since Dec 2004
Feb 1st, 2005
0

Re: html question

well sort of, but the align tag has been deprecated... which means your no longer supposed to be usign it
align <-- cancelled, deleted, removed from HTML 4 (granted browsers still maintain backwards compatibility but nonetheless)

I want to know how to replace the align tag with css which is what they tell you to replace it with.
Reputation Points: 13
Solved Threads: 4
Posting Whiz
paradox814 is offline Offline
351 posts
since Oct 2004
Feb 2nd, 2005
0

Re: html question

CSS replacement for the depreciated align tag is text-align

text align in CSS
PHP Syntax (Toggle Plain Text)
  1. <div style="text-align: center;"> your text</div>
image align in CSS
PHP Syntax (Toggle Plain Text)
  1. <div style="text-align: center;"> <img src="imagename.extention"/></div>
table as mikeSQL said:
PHP Syntax (Toggle Plain Text)
  1. <table align="center" width="50%" border="0" cellpadding="0" cellspacing="0">
  2. <tr>
  3. <td>&nbsp;</td>
  4. </tr>
  5. </table>
Not sure if there is another way of doing this.

SE (Dave)
Reputation Points: 11
Solved Threads: 8
Junior Poster
steveneven is offline Offline
147 posts
since Jan 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: 301 Redirect
Next Thread in PHP Forum Timeline: How do I put a blog RSS feed in PHPBB?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC