16 Replies Latest reply: May 12, 2009 10:43 AM by mlbe8 RSS

    Firefox not centring content

    mlbe8 Community Member

      This is an Example of what the box/table looks like

       

      It appears in Firefox like this to the left

       

       

      On one of my pages on my site i have several boxes like the one above, 100px in height & 600px in width, these are placed in my main content area which is 800px wide, so to display neat and tidy i centred them using the Align option in the properties pannel.  In the Dreamweaver CS4 design view everything looks just as i wanted it to, also when viewed in Internet Explorer again everything looks fine with the tables centred.  However when i view in Firefox the boxes appear to the left, over the past week and a half i have tried everything but cannot find a solution.  I am worried as i know Firefox is a popular choice of browser so finding a solution is essential. I would greatly appreciate any comments regarding this. Thank You.

        • 1. Re: Firefox not centring content
          Mark A. Boyd Community Member

          Your table is centered for me in this forum in FF 3.0.10

           

          FireShot capture #17 - 'Adobe Forums_ Firefox not centring content' - forums_adobe_com_thread_430933_tstart=0.png


          If you give us a URL to the problem page, we might be able to see what you're seeing and offer a solution.

           

          Meanwhile, check if it validates

           

          HTML:

          http://validator.w3.org/

          CSS:

          http://jigsaw.w3.org/css-validator/

           

          --
          Mark A. Boyd
          Keep-On-Learnin' :-)

          • 2. Re: Firefox not centring content
            mlbe8 Community Member

            no url site isnt live yet, it's basicly as i said firefox not centring content, all other browsers do

            • 3. Re: Firefox not centring content
              mlbe8 Community Member

              ran the page through the validator and it came back as passed, but still have the problem in firefox

              • 4. Re: Firefox not centring content
                Mark A. Boyd Community Member

                no url site isnt live yet, it's basicly as i said firefox not centring content, all other browsers do

                 

                I would still bet on something in the code. FF 3.x is one of the most compliant browsers available.

                 

                Can you can upload the page and its required files (css,images,etc...) to a temporary folder and give us a URL? That is the best way to get help in here since we can see the code in the full context of the site's layout.

                 

                2nd best, if you can paste the code in here (don't forget to include relevant CSS), using the steps shown in this useful link, Posting code in this forum

                 

                --
                Mark A. Boyd
                Keep-On-Learnin' :-)

                • 5. Re: Firefox not centring content
                  mlbe8 Community Member

                  File enclosed all HTML and CSS.  This works in IE no problems there, just firefox, so if there was an error in the code wouldnt IE display the same problem with alignment.  Thank you mark

                  • 6. Re: Firefox not centring content
                    mlbe8 Community Member

                    File enclosed

                    • 7. Re: Firefox not centring content
                      Mark A. Boyd Community Member

                      File enclosed all HTML and CSS.

                       

                      Where? Did you follow the instructions in the link I gave you? Or did you forget to post a URL?

                       

                      This works in IE no problems there, just firefox, so if there was an error in the code wouldnt IE display the same problem with alignment.

                       

                      Never make the assumption that IE and any other browser in the world will render the same. They get pretty darned close with proper DOCTYPEs and valid code, though. MS has decided to join the rest of the world with IE8, but earlier versions are frought with rendering problems - in part because MS doesn't understand basic math.

                       

                       

                      --
                      Mark A. Boyd
                      Keep-On-Learnin' :-)

                       

                      Message was edited by: Mark A. Boyd: Fixed a glaring typo.

                      • 8. Re: Firefox not centring content
                        Mark A. Boyd Community Member

                        File enclosed

                        Nope.

                         

                        Posting code in this forum


                        --
                        Mark A. Boyd
                        Keep-On-Learnin' :-)

                        • 9. Re: Firefox not centring content
                          mlbe8 Community Member

                          This is all the code, remember it's the tables that wont center align, thank you for your help.

                           

                           

                          http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

                           

                           

                          <!--

                          body,td,th

                          a:link

                          a:hover

                          a:visited

                          a:active {

                              text-decoration: none;

                          }

                          -->

                           

                          <!--

                          a:visited

                          a:hover

                          -->

                          hvlogo
                          HOME     |     INFORMATION     |     TUTORIALS     |     CONTACT    |    ABOUT ME

                           

                           

                           

                           

                             photoshop

                           

                             fireworks

                           

                             flash

                           

                             bridge

                           

                             helpvid

                           

                           

                           

                          sss

                          imgfooter

                          </html

                          • 10. Re: Firefox not centring content
                            mlbe8 Community Member

                            Not sure what you mean by url as my site isnt live yet i dont have one.  I put the HTML and CSS on a wordpad page, placed that in a folder, sent to compressed zipped folder and attatched to e-mail, the thread would not allow me to attatch zip folder

                            • 11. Re: Firefox not centring content
                              Mark A. Boyd Community Member

                              The way you're posting code would force me to View Source - in Adobe's Forum pages - and try to weed out your code from the rest! I'm not going to put that kind of effort into this.

                               

                              Last try: Posting code in this forum

                               

                              >> Insert->Syntax Highlighting->Plain

                               

                              And I just tested those steps again in another forum successfully, so it should work just fine in here as it always has.

                              • 12. Re: Firefox not centring content
                                Mark A. Boyd Community Member

                                OK. I just ran another test. Apparently certain types of links pasted from the Web forum no longer arrive as links in the BROKEN email system!

                                 

                                So if you haven't logged into the Web forum and have been trying to do all of this via email, then that is a MAJOR PROBLEM WITH THIS JIVE FORUM!!!

                                 

                                I have been trying to get you to follow the steps here http://forums.adobe.com/thread/427712

                                 

                                Sorry about ranting in your thread, but I am fed up with the Jive forum. I previously thought that email notifications were worth something, but I have lost any confidence in that. I already knew that email replies are borked.

                                 

                                 

                                --
                                Mark A. Boyd
                                Keep-On-Learnin' >:-|

                                • 13. Re: Firefox not centring content
                                  Mark A. Boyd Community Member

                                  For some reason, even though the tread is not locked, I cannot reply in

                                  this thread via the Web. I will try via email before I call it a night.

                                   

                                  Here is what I have been trying to post:

                                   

                                  -START-

                                  There is a way to include code that will, for the most part, arrive in a

                                  readable format online and maybe even in other email programs.

                                   

                                  Use code blocks. In HTML that would be blah, blah. For this

                                  system, use square brackets in place of angle brackets.

                                   

                                  I don't know if this will appear in your email correctly, but...

                                   

                                  PASTE YOUR CODE HERE
                                  

                                   

                                  That might work, but it may introduce word-wraps. Using the Web forum

                                  with the steps mentioned already will work as a 2nd choice to using a

                                  live URL.

                                   

                                  -STOP-

                                   

                                  Of course, you will NOT be able to see exactly what I was trying to post

                                  because Jive will alter this email on the way to you. Imagine these

                                  angle brackets below are square brackets.

                                   

                                  PASTE YOUR CODE HERE

                                   

                                   

                                   

                                  --

                                  Mark A. Boyd

                                  Keep-On-Learnin'

                                   

                                  xeron8 wrote the following:

                                  Not sure what you mean by url as my site isnt live yet i dont have one.  I put the HTML and CSS on a wordpad page, placed that in a folder, sent to compressed zipped folder and attatched to e-mail, the thread would not allow me to attatch zip folder

                                  >

                                  • 14. Re: Firefox not centring content
                                    mlbe8 Community Member

                                    https://zzxc.net/sumo/may09/mlbe8/website/index/mock.html.html

                                     

                                    Hi got that page uploaded, we were talking last night regarding my tables being aligned to the left when viewed in firefox

                                    • 15. Re: Firefox not centring content
                                      Mark A. Boyd Community Member

                                      Wow, thanks. I thought you had given up due to the mess in here. Providing the link is, by far, the best method - particularly using a temporary URL as you have that can be taken down without breaking a live site. Good job.

                                       

                                      If you expect to center all tables, you can add this to your CSS

                                       

                                      table {
                                        margin-left: auto;
                                        margin-right: auto;
                                      }

                                       

                                      Otherwise, if you just want to center tables (or any elements), you can add this

                                       

                                      .centered {
                                        margin-left: auto;
                                        margin-right: auto;
                                      }

                                       

                                      And include the class in your centered elements ala:

                                       

                                      <table class="centered" width="600" ...

                                       

                                      Note that using margin auto this way does require the width property to work - as you have done for your tables.

                                       

                                      --
                                      Mark A. Boyd
                                      Keep-On-Learnin' :-)

                                      • 16. Re: Firefox not centring content
                                        mlbe8 Community Member

                                        Thank you, like your moto keep on learning, mine is (never give up)

                                        Thanks for feedback i will try that when i get a moment.