•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 422,817 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,373 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 1869 | Replies: 11
![]() |
•
•
Join Date: Jun 2006
Location: U.S.A California
Posts: 115
Reputation:
Rep Power: 3
Solved Threads: 0
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 954
Reputation:
Rep Power: 5
Solved Threads: 48
•
•
•
•
I know that if i use the center tag, tahat i cant use the position:absolute style in css to move to bottom. So what can i do??
why not? it should work o_O if not:
<div style="position:absolute;"><center>i'm in the middle</center></div>
<div style="position:absolute;text-align:center;">i'm in the middle</div>
If it only works in Internet Explorer; it doesn't work.
It isn't a matter of "changing minds". It's simply a matter of which HTML version, meaning schema, indicated by DOCYTPE, you are using.
The "center" tag is perfectly valid, in certain versions of HTML.
The arguments that it SHOULDN'T be used, even where it's legal, are philosophical in nature and should never stand in the way of "getting the job done". The argument, of course, is that "centering" something is purely visual, unrelated to the structure of the document, and that HTML is structural markup. Any markup having to do with presentation, should be done with CSS.
The "center" tag is perfectly valid, in certain versions of HTML.
The arguments that it SHOULDN'T be used, even where it's legal, are philosophical in nature and should never stand in the way of "getting the job done". The argument, of course, is that "centering" something is purely visual, unrelated to the structure of the document, and that HTML is structural markup. Any markup having to do with presentation, should be done with CSS.
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 954
Reputation:
Rep Power: 5
Solved Threads: 48
ah; i understand. when my comments are in that tone, it's purely satirical.
i thought center was outright deprecated in all current versions of HTML? i write in XHTML transitional because I usually generate pages from XML, and I don't care much for SGML anyway. my pages start life with a simple XML structure, and end up with a different (complex) HTML structure. that's why I'm firmly in the belief that a page must be defined by more than it's CSS, and any attempts to move certain aspects of a page into CSS will result in CSS looking more like HTML, and ending up needing it's own style descriptor.
i don't have any problem with "the powers that be" or the guidelines, or even following the guidelines. or conforming to a doctype, or using a doctype. infact, I like the doctypes. quirks mode aint so nice.
but I'll never agree that HTML isn't a means of presenting data. sometimes the structure is the presentation.
i thought center was outright deprecated in all current versions of HTML? i write in XHTML transitional because I usually generate pages from XML, and I don't care much for SGML anyway. my pages start life with a simple XML structure, and end up with a different (complex) HTML structure. that's why I'm firmly in the belief that a page must be defined by more than it's CSS, and any attempts to move certain aspects of a page into CSS will result in CSS looking more like HTML, and ending up needing it's own style descriptor.
i don't have any problem with "the powers that be" or the guidelines, or even following the guidelines. or conforming to a doctype, or using a doctype. infact, I like the doctypes. quirks mode aint so nice.
but I'll never agree that HTML isn't a means of presenting data. sometimes the structure is the presentation.
If it only works in Internet Explorer; it doesn't work.
You'll find I agree with you. You're right, "center" isn't in some of the newer standards. But with HTML, one standard doesn't necessarily supersede an older standard. You can code any HTML standard you like. As browsers get better, then adhere more closely to the standards. If you declare the proper doctype, then you're mostly ok. If you want to use HTML 3.2 and the "center" tag: go for it.
I too agree that separating structure and content isn't so easy. "Centering" is a good example. Try telling an architect the "central" support beam isn't structural.
I too agree that separating structure and content isn't so easy. "Centering" is a good example. Try telling an architect the "central" support beam isn't structural.
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 954
Reputation:
Rep Power: 5
Solved Threads: 48
i never let convention or heresay get in the way of what i want to do. if it comes to it, i'll try to force the appearance/flexibility i want by whatever means available.
but, the amount of people (admitadly, they're mostly in other forums) who want to move everything possible into CSS, and the "you must be joking" response to simple flexible solutions involving !tables!, i do feel like i must be in the opinion minority sometimes o_O
but, the amount of people (admitadly, they're mostly in other forums) who want to move everything possible into CSS, and the "you must be joking" response to simple flexible solutions involving !tables!, i do feel like i must be in the opinion minority sometimes o_O
If it only works in Internet Explorer; it doesn't work.
•
•
Join Date: Jun 2006
Location: U.S.A California
Posts: 115
Reputation:
Rep Power: 3
Solved Threads: 0
:cheesy: Hey thanx Dudes. im not all that up to date with certain standards.
Now this "text-align:center", i hear people use it to center everything now adays, but what i also heard is that it doesnt work on all browsers. I like to make the type of pages were both Fox and IE(dont really care about opera) read them the same(compadibility). :mrgreen:
Now this "text-align:center", i hear people use it to center everything now adays, but what i also heard is that it doesnt work on all browsers. I like to make the type of pages were both Fox and IE(dont really care about opera) read them the same(compadibility). :mrgreen:
MARTINEX();
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 954
Reputation:
Rep Power: 5
Solved Threads: 48
text-align:center will work in firefox, and ie. but it might not work in very old versions. you should also pick a document type for your page(s), otherwise the browser(s) will have something of a field day when it comes to how they make things look. if you pick a recent document type, then your page will probably look ok on all browsers* including opera.
http://alistapart.com/stories/doctype/
*that support CSS =P
http://alistapart.com/stories/doctype/
*that support CSS =P
If it only works in Internet Explorer; it doesn't work.
![]() |
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- No page header and footer when printing a web page (JavaScript / DHTML / AJAX)
- CSS footer? (HTML and CSS)
- footer and nav include (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: CSS & menu
- Next Thread: fancy borders with images... ?



Linear Mode