Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-05-2009, 10:51 PM   #1
kenny
Confirmed User
 
Industry Role:
Join Date: Mar 2002
Posts: 7,245
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;
}
__________________
7
kenny is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-05-2009, 10:55 PM   #2
PornMD
Mainstream Businessman
 
PornMD's Avatar
 
Industry Role:
Join Date: Jan 2007
Location: San Diego
Posts: 9,291
Quote:
Originally Posted by kenny View Post
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;
}
Yea, I have to admit it seems pretty lame. I have been using divs to do it and it seems to satisfy XHTML, but still I know I'm not doing it fully right.
__________________
Want to crush it in mainstream with Facebook ads? Hit me up.
PornMD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 05:35 AM   #3
rowan
Too lazy to set a custom title
 
Join Date: Mar 2002
Location: Australia
Posts: 17,393
<center> is probably my favourite tag, right after <td> :D I'm going to hell.
rowan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 06:43 AM   #4
sysk
Confirmed User
 
sysk's Avatar
 
Industry Role:
Join Date: Aug 2007
Location: Montreal
Posts: 1,005
__________________
icq: 612510168 / email: [email protected] / php ninja 4 hire
sysk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 06:46 AM   #5
420
cuck
 
420's Avatar
 
Industry Role:
Join Date: Mar 2003
Posts: 11,571
i wish i was cool <br><br><br><br><br><br>
__________________
<!--BEGIN SIMUTRONICS PLAY BUTTON CODE -->
<p align="center">

<a href="http://buddy.play.net/dr?TMOREAU1">

<img src="drplay.gif" width="128" height="64" alt="Play DragonRealms!"></a></p>

<!--END SIMUTRONICS PLAY BUTTON CODE -->
420 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 06:53 AM   #6
MetaMan
I AM WEB 2.0
 
Industry Role:
Join Date: Jan 2003
Posts: 28,682
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.
MetaMan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 07:11 AM   #7
seeandsee
Check SIG!
 
seeandsee's Avatar
 
Industry Role:
Join Date: Mar 2006
Location: Europe (Skype: gojkoas)
Posts: 50,945
CSS eats my shit
__________________
BUY MY SIG - 50$/Year

Contact here
seeandsee is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 07:13 AM   #8
kenny
Confirmed User
 
Industry Role:
Join Date: Mar 2002
Posts: 7,245
Quote:
Originally Posted by MetaMan View Post
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.

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
__________________
7
kenny is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 07:18 AM   #9
kenny
Confirmed User
 
Industry Role:
Join Date: Mar 2002
Posts: 7,245
Quote:
Originally Posted by sysk View Post

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?
__________________
7
kenny is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 07:23 AM   #10
TheDoc
Too lazy to set a custom title
 
TheDoc's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
This is what I use... it's compliant, and it works without question.
Code:
<div align="center">wrap/words</div>
Works great when everything else is left but you need a block of text centered.
Code:
<p align="center">words</p>
__________________
~TheDoc - ICQ7765825
It's all disambiguation
TheDoc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 07:27 AM   #11
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
http://buildinternet.com/2008/11/how...site-with-css/
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 07:31 AM   #12
kenny
Confirmed User
 
Industry Role:
Join Date: Mar 2002
Posts: 7,245
Yes, I know there are ways to do this using CSS

my point is that <center> did all of this without a block of code
__________________
7
kenny is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 07:34 AM   #13
kenny
Confirmed User
 
Industry Role:
Join Date: Mar 2002
Posts: 7,245
Quote:
Originally Posted by TheDoc View Post
This is what I use... it's compliant, and it works without question.
Code:
<div align="center">wrap/words</div>
Works great when everything else is left but you need a block of text centered.
Code:
<p align="center">words</p>
you're not suppose to do that now either

don't quote me but I'm pretty sure
__________________
7
kenny is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 07:39 AM   #14
kenny
Confirmed User
 
Industry Role:
Join Date: Mar 2002
Posts: 7,245
Quote:
Originally Posted by TheDoc View Post
This is what I use... it's compliant, and it works without question.
Code:
<div align="center">wrap/words</div>
Works great when everything else is left but you need a block of text centered.
Code:
<p align="center">words</p>
http://www.w3schools.com/tags/att_div_align.asp

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..
__________________
7
kenny is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 07:51 AM   #15
TheDoc
Too lazy to set a custom title
 
TheDoc's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
Quote:
Originally Posted by kenny View Post
http://www.w3schools.com/tags/att_div_align.asp

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..


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.
__________________
~TheDoc - ICQ7765825
It's all disambiguation
TheDoc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 07:58 AM   #16
kenny
Confirmed User
 
Industry Role:
Join Date: Mar 2002
Posts: 7,245
Quote:
Originally Posted by TheDoc View Post
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.
I was just shooting for 100% compliance across the board.

Your way is simpler than other CSS methonds.. but come on.. <CENTER> hands down walks this dog
__________________
7
kenny is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 08:05 AM   #17
TheDoc
Too lazy to set a custom title
 
TheDoc's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
Quote:
Originally Posted by kenny View Post
I was just shooting for 100% compliance across the board.

Your way is simpler than other CSS methonds.. but come on.. <CENTER> hands down walks this dog
Object embeds aren't complaint either but it's better than using Javascript
__________________
~TheDoc - ICQ7765825
It's all disambiguation
TheDoc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 10:05 AM   #18
donborno
Confirmed User
 
Join Date: Jan 2007
Location: Vienna, Austria
Posts: 374
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.
donborno is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 11:01 AM   #19
Serge Litehead
Confirmed User
 
Serge Litehead's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
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..
__________________
Serge Litehead is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 11:19 AM   #20
TheDoc
Too lazy to set a custom title
 
TheDoc's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
Quote:
Originally Posted by donborno View Post
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.
Creating ANYTHING is ALL about reducing the work and making it load/run faster. It doesn't make a difference if it's code, html or css..

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..
__________________
~TheDoc - ICQ7765825
It's all disambiguation

Last edited by TheDoc; 06-06-2009 at 11:23 AM..
TheDoc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2009, 03:18 PM   #21
Hentaikid
Confirmed User
 
Hentaikid's Avatar
 
Join Date: Nov 2002
Posts: 1,249
It's been deprecated for ages, but most browsers still respect it out of backwards compatibility... so knock yourself out...
Hentaikid is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.