Saturday, April 24, 2010

Getting a table to center correctly in IE.. Works in Firefox, not IE.?

http://charlespluta.com/temps/1337/index...



This is the index file.



http://charlespluta.com/temps/1337/css.c...



CSS Stylesheet.



My method is working perfectly in Firefox, but the text obviously doesn't align correctly in IE. Since IE still has so much market share.. It needs to work.



I'm using PHP to include the Copyright %26amp; Navigation lines, then putting the text inside the file. Both of the Banner %26amp; Navigation centers correctly in IE, but the text and copyright doesn't... The copyright is in a different %26lt;tr%26gt; than the text in its own table...



A whole 10 points to someone who thinks they can figure out the solution.



Getting a table to center correctly in IE.. Works in Firefox, not IE.?microsoft templates





?? THIS YOUR BEST OPTION ??



? It is best not to use the idea above of absolute positioning. that only works well if you are absolutely certain what monitor resolution your targeted audiernce is going to use. Since there is no way to know that without creating different pages for different resolutions then you shouldn't do it. Absolute positioning should only be used when you have no other choice.



? Instead to simply align a table with the least amount of coding do this



%26lt;table align="center"%26gt;



or in css you can do this



%26lt;style type="text/css"%26gt;



body {



/* Center For IE *?



text-align:center;



/* Center For All Other Browsers */



margin:0 auto;



}



%26lt;/style%26gt;



? Now your table and everything else on your pages will be centered. just add text-align:left; to the elements that you don't want to be centered.



%26lt;style type="text/css"%26gt;



body {



/* Center For IE *?



text-align:center;



/* Center For All Other Browsers */



margin:0 auto;



}



p,ul,ol {



text-align:left;



}



%26lt;/style%26gt;



//////////////////////////



? Here are some great CSS books. read below about libraries to get these books free.



? http://www.idest.com/csshacks/



? http://www.oreilly.com/catalog/css2...



? http://www.oreilly.com/catalog/095792188...



? You can't get better books than those published by oreilly. here are their other books



? http://www.oreilly.com/catalog/...



best html reference http://www.w3schools.com/html/html_refer... best style sheet reference http://www.w3schools.com/css/css_referen... html links http://www.websitetips.com/html/... style sheet links http://www.websitetips.com/css/... html dom http://www.w3schools.com/htmldom/dom_ref...



? Many libraries world wide have books related to the internet, web and computers in general. They also have CDs and DVDs. Go to your local public library and get the username and password for http://www.firstsearch.org/ You can look up the book yourself but they will have to order it for you. Sometimes this can take awhile if the book is checked out by someone else. After reading the books and making copies of certain pages with a photo copier simply return it to them.



? By using firstsearch you can search for any book in the world. Some libraries might charge a small fee but most are free. Every web design book I have read was acquired in this fashion. :)



Getting a table to center correctly in IE.. Works in Firefox, not IE.?windows firewall internet explorer



Use the power of CSS.



div#my_table {



position: absolute;



left: #px;



top: #px;



}



Put that sucker anywhere you want after that. :D
you shouldn't use tables to layout text. use a div tag instead. where your content is try this. this will spread the whole width and align the text center in the div.



%26lt;div style="text-align: center;"%26gt;



text goes here



%26lt;/div%26gt;
I know the problem. Its with using "position: absolute;" in the css. do u want me to edit both html n css so luks like firefox in IE?



Techsupport@3doms.com to reply

No comments:

Post a Comment

 
hosting services