Glom Posted March 10, 2006 Share Posted March 10, 2006 (edited) Hi. Thank you for the excellent website. It has really helped me a heck of a lot with my website. You should have seen the code before I came here.I do have a couple of questions though.First question:It says here that the align attribute for tables has been deprecated and we should use styles for alignment but I can't find how exactly that works. I tried the obvious trick. style="align:left" That didn't seem to work though. How do you set the alignment of the table in strict xhtml?Second question:My website uses a lot of acronyms and abbreviations. I found out about the acronym tag here. Is there a way, perhaps using an external css to make it so the acronym function is automatically employed rather than having to tag every one manually?Thanks in advance for any help.Fixed link. Edited March 13, 2006 by Jonas Link to comment Share on other sites More sharing options...
boen_robot Posted March 10, 2006 Share Posted March 10, 2006 You should learn CSS in more details I think. There is no such thing as "align". There is "text-align" though. To left align a table however, you should use "margin-left: 0 auto;". I'm not sure about this one though. I usually center elements(margin: 0 auto;), not left or right aligning them. If it doesn't work, "margin-right: 0 auto;" should work.I don't know how can a browser know when a word is abbreviation or a ordinary word. There are ways with other languages (server side languages, XSLT with XML, etc.) with which you can declare all acronyms at one spot and apply the <acronym> element for each one, but no way with pure XHTML and CSS. What you can do with CSS however would be to give a special styling for every acronym. Link to comment Share on other sites More sharing options...
Glom Posted March 10, 2006 Author Share Posted March 10, 2006 You should learn CSS in more details I think. There is no such thing as "align". There is "text-align" though. To left align a table however, you should use "margin-left: 0 auto;". I'm not sure about this one though. I usually center elements(margin: 0 auto;), not left or right aligning them. If it doesn't work, "margin-right: 0 auto;" should work.Thanks. That worked for centre aligning, but not your suggestion about left aligning. What I want is for the table to sit among the text.Here is an example of a page where I'm interested in getting those tables aligned.I don't know how can a browser know when a word is abbreviation or a ordinary word. There are ways with other languages (server side languages, XSLT with XML, etc.) with which you can declare all acronyms at one spot and apply the <acronym> element for each one, but no way with pure XHTML and CSS. What you can do with CSS however would be to give a special styling for every acronym.<{POST_SNAPBACK}> I guess I'm going to have bite the bullet with that. Link to comment Share on other sites More sharing options...
sbrownii Posted March 11, 2006 Share Posted March 11, 2006 question #2 can be answered with scriptinga somewhat similar question can be found herewhat does "sit among the text" mean?is there a site you have seen that does that, so I can see an example? Link to comment Share on other sites More sharing options...
vchris Posted March 13, 2006 Share Posted March 13, 2006 style="text-align: left;" should left align your table. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now