Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Newer Constructs Recommended - huh?
Old 08-13-2007, 08:18 PM Newer Constructs Recommended - huh?
AirAndAqua.com's Avatar
Experienced Talker

Posts: 35
Name: James
Trades: 0
I usually use <div align="center"> and while using expression web which points out errors in HTML, it tells me that the Wc3 considers align as an outdated attribute. My question is, what should I use instead of align?
__________________

Please login or register to view this content. Registration is FREE
(Air and Water Purification Products)

Please login or register to view this content. Registration is FREE
(Minnesota Exteriors Storm Damage insurance Claims)
Personal Page -
Please login or register to view this content. Registration is FREE
AirAndAqua.com is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-13-2007, 08:28 PM Re: Newer Constructs Recommended - huh?
JamieLewis's Avatar
Pretty Much a Big Deal...

Latest Blog Post:
Gooie
Posts: 385
Name: Jamie Lewis
Location: UK
Trades: 0
CSS

Jamie
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
JamieLewis is offline
Reply With Quote
View Public Profile Visit JamieLewis's homepage!
 
Old 08-13-2007, 09:46 PM Re: Newer Constructs Recommended - huh?
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
<div style="margin:0 auto; text-align:center;">

You really don't want the text align part, but IE is stupid. You can use a paragraph, or a series of them, justified left, full, or whatever. It's even easier if you use an ID:

<div id="someDiv">
...
</div>
<style>
#someDiv { margin:0 auto; text-align:center; }
#someDiv p { text-align:left; }
</style>

Maybe you do want the text inside your div centered? Unfortunately, IE doesn't understand margin:0 auto, and uses text alignment on images. You could sniff the user agent string to figure out which browser a person is using and direct them to a different style sheet, but ... that's a lot of pain.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 08-13-2007, 11:24 PM Re: Newer Constructs Recommended - huh?
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,935
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Actually, IE6 and IE7 do understand margin: 0 auto. It's IE5.5 and below that don't.

Other than that, Forrest's advice is bang on.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Reply     « Reply to Newer Constructs Recommended - huh?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.14862 seconds with 12 queries