|
| |
|
|
sljsh
Posts: 76 Joined: 1/30/2002 Status: offline
|
<div align=" center" > replacement - 9/15/2002 19:04:24
Hi, all. If the align=" center" for the div tag has been deprecated, what would be the alternative the center the div on a page? Lisa www.bio-ox.com
|
|
|
|
puiwaihin
Posts: 1378 From: Taiwan Status: offline
|
RE: <div align=" center" > replacement - 9/15/2002 19:50:10
I believe the way they would suggest doing it would be by defining the div tag in your stylesheet and use the style attribute to specify varying styles.
_____________________________
" Things are always darkest, just before it goes totally black." -Hannibal Smith
|
|
|
|
sljsh
Posts: 76 Joined: 1/30/2002 Status: offline
|
RE: <div align=" center" > replacement - 9/15/2002 20:32:31
I tried using div {align: center} but that didn' t work. Is there another way? Lisa www.bio-ox.com
|
|
|
|
Doug G
Posts: 1197 Joined: 12/29/2001 From: SoCal Status: offline
|
RE: <div align=" center" > replacement - 9/15/2002 20:48:47
Well, you could define a css class that' s centered, and then use <div class=" myclass" >
_____________________________
====== Doug G ======
|
|
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: <div align=" center" > replacement - 9/16/2002 0:49:26
Sorry, I gave the advice for <div align=" center" >. The thing is, even though the attribute is deprecated, it is still widely supported. Probably even more so than the css equivalent which would be... div{margin-right:auto;margin-left:auto;width:740px;} or the shorthand version... div{margin:0 auto;width:740px;} Either or should do the trick for most CSS compliant browsers. I didn' t realize you were ready to take that deep of a plunge. Even though using deprecated tags is not recommended, there are some instances where you may have to bite the bullet for a while and use those tags until you understand CSS. Good luck!
_____________________________
SEO Consultants Directory Find Search Engine Marketing Companies
|
|
|
|
sljsh
Posts: 76 Joined: 1/30/2002 Status: offline
|
RE: <div align=" center" > replacement - 9/16/2002 8:11:11
Thanks for the input. The div {text-align: center;} doesn' t seem to work as well in all browsers as (div align=" center" }. My main concern was getting my pages to look usable in Mac IE. I' ve been trying to get a grasp on this tutorial http://webreference.com/authoring/style/sheets/layout/advanced/ but it' s overwhelming! Thanks, Lisa www.bio-ox.com
|
|
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: <div align=" center" > replacement - 9/16/2002 11:32:07
> The div {text-align: center;} doesn' t seem to work as well in all browsers as (div align=" center" }. These are two different things. The text-align: center is used to center the content within the div. It would be the same as p align=" center" . The div align=" center" is used to center the entire block element that it is assigned to. It would be the same as table align=" center" .
_____________________________
SEO Consultants Directory Find Search Engine Marketing Companies
|
|
|
|
sljsh
Posts: 76 Joined: 1/30/2002 Status: offline
|
RE: <div align=" center" > replacement - 9/18/2002 13:25:06
My problem now lies in my shopping cart area (I use Miva Merchant). In IE, the shopping cart pages are centered. In N7, they are aligned to the left. When I added div{margin-right:auto;margin-left:auto;width:750px;} to the shopping cart style sheet, the IE then aligned to the left and the N7 pages were centered. Weird. Lisa www.bio-ox.com
|
|
|
|
jbrandt04330
Posts: 35 Joined: 2/18/2002 From: Augusta ME USA Status: offline
|
RE: <div align=" center" > replacement - 9/20/2002 14:12:38
I may be wrong, but I do not think the <div align=" center" > is deprecated. You may be confused with the HTML code <center></center> which IS deprecated. Unfortunately, FP2K still adds both to the code when you add the centering element around tables. If you try to validate to HTML 4.01, the <center> with be in error, the <div align=" center" > will be fine. You need to go in HTML view and manually delete the <center> coding. jeb
_____________________________
john e brandt jebswebs.com
|
|
|
|
sljsh
Posts: 76 Joined: 1/30/2002 Status: offline
|
RE: <div align=" center" > replacement - 9/21/2002 0:23:50
Thanks, Bobby, but unfortunately it' s not. I' ve just been trying to tackle one problem at a time. I figured it out. Instead of putting the info in the div, I put it in the body tag and it seems to be working now - centered in IE and N7. I' ve given up on N6. IMO, anyone using N6 should upgrade to N7 immediately. My bigger problem is that I' ve been told that my site in unusable using Mac IE, Though it seems to be fine in Mac AOL. Go figure. I don' t know the first thing about programming for a Mac. I wonder how many customers I' m losing. Lisa www.bio-ox.com
|
|
|
|
lyberty
Posts: 1 Joined: 11/4/2005 Status: offline
|
RE: <div align=" center" > replacement - 11/4/2005 17:39:46
Simple, straightforward, useful:
<center>
. . .
. . .
</center>
An unnecessary addition, but still simple and useful:
<div align="center">
...
...
</div>
An idiodic "improvement" (now with 500% more code!):
<style>
center{margin-right:auto;margin-left:auto;width:740px;}
</style>
<div class="center">
...
...
</div>
This is progress?!?!? By the way, just use body { text-align: center;} to center the whole page.
|
|
|
|
coreymanshack
Posts: 1 Joined: 11/20/2005 Status: offline
|
RE: <div align=" center" > replacement - 11/20/2005 16:09:13
hey all! i am currently running IE6 and none of the concepts listed above worked for me! Although after looking at some of the examples you all provided a came up with a solution. <html> <head> <title> DEMA.COM </title> <style> body { background-color:black; font-family:terminal; color:#2D5B89; text-align: center; } #page { width:750px; height:400px; text-align: left; } </style> </head> <body> <div id="page"> <img src="menubar.gif" border="0"/> This is the page contents. </div> </body> </html> I put text align center in the body section in css to center everything in the page. then i put text align is left for the div page in the css. I just thought u all should know this because I was frustrated after going to several websites and none of the examples working!
|
|
|
|
memphisink
Posts: 7 Joined: 6/22/2008 Status: offline
|
RE: <div align=" center" > replacement - 6/23/2008 10:23:52
how i dont know how to do that? tailslide can you help me?
|
|
|
|
memphisink
Posts: 7 Joined: 6/22/2008 Status: offline
|
RE: <div align=" center" > replacement - 6/23/2008 16:58:09
how do i make a style sheet and where do i put it??
|
|
|
|
MCD
Posts: 774 Joined: 3/19/2002 From: Al USA Status: offline
|
RE: <div align=" center" > replacement - 6/24/2008 6:25:49
Have you noticed that when a woman says "oh dear" anything that follows will not be good? (Sorry, back to topic new)
_____________________________
Author of " How To Build A Website With Duct Tape"
|
|
|
|
digitz
Posts: 1 Joined: 4/17/2010 Status: offline
|
RE: <div align=" center" > replacement - 4/17/2010 2:44:34
Here's the official word on this topic: http://www.w3.org/TR/REC-html40/present/graphics.html Basically, you must now declare a class and use text-align:center, which also works for images..
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|