![]() |
The center element is deprecated
The <center> tag is supported in all major browsers. However, it is deprecated and should be avoided!
http://www.w3schools.com/TAGS/tag_center.asp Is there a good reason for this? Why is it suppose to be better to replace <center> with this mess" #centered{ width: 800px; /* set to desired width in px or percent */ text-align: left; /* optionally you could use "justified" */ border: 0px; /* Changing this value will add lines around the centered area */ padding: 0; margin: 0 auto; } |
Quote:
|
<center> is probably my favourite tag, right after <td> :D I'm going to hell.
|
|
i wish i was cool <br><br><br><br><br><br> :( |
Everything on a page should be controlled by a parent element, why would you center the element outside of the stylesheet when you are already giving it properties?
you are defeating the point of the CSS then. |
CSS eats my shit :)
|
Quote:
In this case it appears CSS is defeating it's self. If I want to center the entire webpage I fail to see how any tool can be more effective than the <CENTER> tag. CSS is soppose to make the job easier not harder |
Quote:
So its not breaking news.. I must of missed that months issue of Geek Magazine Fuck off with that dumb time line shit Did somebody beat me to this topic? Can you point out a duplicate thread? |
This is what I use... it's compliant, and it works without question.
Code:
<div align="center">wrap/words</div> Code:
<p align="center">words</p> |
|
Quote:
my point is that <center> did all of this without a block of code |
Quote:
don't quote me but I'm pretty sure |
Quote:
Compatibility Notes The align attribute of the div element was deprecated in HTML 4.01 and is not supported in XHTML 1.0 Strict DTD. Use CSS instead. CSS syntax: <div style="text-align:center"> None if it centers the whole webpage anyway.. |
Quote:
My example returns complaint... The div align=center centers a div, which centers the entire webpage. Using less html and css than any other method, that returns complaint. It not returning complaint in xhtml strict, which I don't have anything that uses that, so I'm not really worried about it. My example does use less bytes of data, it works in every browser - every time, and it returns complaint for me, every single time. |
Quote:
Your way is simpler than other CSS methonds.. but come on.. <CENTER> hands down walks this dog :1orglaugh |
Quote:
|
The idea of XHTML and CSS is to keep structured content seperately from design and layout (for various reasons), not to reduce the number of letters you have to type.
|
whoa, last time i sow or used <center> was few good years back)
regarding tables, recently done one paysite tour, sliced in div 100% valid - we had to reslice it all in tables because client's cms had <tr>s and <td>s hardcoded into system - how crazy is that)))) iframe is no good too and default adobe's flash embed is not valid.. its hard to switch when you're used to old methods of doing things, but most of time after changing it becomes much better and easier and sometimes result in more options what you can do. many do <div><div><div><div><div><div>.... find it crazy - call it transition from past century (tabled nesting), there is really no need to do such complex nesting to keep structure in tact. deep nesting is harder to maintain.. |
Quote:
It speeds up production, reduces possible errors and repeating text/code, makes the css more usable across multi-websites, it makes it work better across browsers, which all together reduces the amount of bytes used at several points, which helps make everything snap load faster, with the browser having to complete less work. Having it this way doesn't mean you will make more sales... But when it's done this way across 100's of Websites, the group reduction makes a difference in my own costs. No different than reducing the sizes of my images or tiny gif's.. |
It's been deprecated for ages, but most browsers still respect it out of backwards compatibility... so knock yourself out...
|
All times are GMT -7. The time now is 06:48 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123