Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8436563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:12:40+00:00 2026-06-10T07:12:40+00:00

vertical and horizontal alignment and height percentage not working correctly in firefox Although it

  • 0

vertical and horizontal alignment and height percentage not working correctly in firefox Although it works fine on IE and Chrome
i set hight and width to 100% in html and body

html,body { heigh:100% ; width:100% }

and i tried all possible solutions like text-align: -moz-center; display:block;
and here’s my code

<table cellpadding="0" cellspacing="0" border="0" style="width: 100%; height: 93%;">
    <tr style="height: 42px; width: 100%">
        <td style="width: 80px; background-image: url(Images/logo.png); background-repeat: no-repeat;
            height: 42px;">
        </td>
        <td style="height: 42px">
        </td>
    </tr>
    <tr align="center" valign="middle">
        <td style="height: 196px;" align="center" valign="middle">
            <table class="partTable" style="padding-bottom: 20px">
           <tr>
                    <td align="center" style="font-size: xx-large; font-family: Arial Black; color: #C11B17">
                        <span>
                            <%=System.Configuration.ConfigurationManager.AppSettings["AppName"]%>
                        </span>
                    </td>
                </tr>
            </table>
            <table border="0" style="text-align: -moz-center; vertical-align: middle; display: block;
                margin: 0 auto;">
                <tr>
                    <td valign="middle" class="partHolder" style="width: 314px; height: 201px;">
                 --Content
                    </td>
                </tr>
            </table>
    </tr>

notice: the table doesn’t take the 93% of the page. it takes like an auto .and thats happened when I put <!DOCTYPE html> before html tag

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:12:42+00:00Added an answer on June 10, 2026 at 7:12 am
    1. Use style margin:0 auto to center your table.
    2. Make sure all containers for table are height: 100%;
      For example:

      • this will work
      • this won’t work – and here is the fix

    And you have some misconvenience in your code:

    <tr style="height: 42px; width: 100%">
               ^^^^^^^^^^^^ this is ok
       </tr>
       <tr align="center" valign="middle">
           <td style="height: 196px;">
                      ^^^^^^^^^^^^^^ 
                     This is wrong. you should 
                     remove it to make table auto-risze. 
                     And you should use `height` only to <tr>
    

    it takes like an auto .and thats happened when I put
    before html tag

    Firefox simply goes mad if you use height:93% and then you use height:42px,height:196px for rows. I believe Firefox is using more strict method to render HTML+CSS when you use <!DOCTYPE html> tag

    Also.. don’t use text-align for table,tr – because they doesn’t contains any text. Use it only for td

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Stacked Vertical is working fine: http://jsfiddle.net/Q28Aj/1/ But if I change the bar to horizontal
With mx:Box I can set the direction to be either horizontal or vertical. I'd
text block how to do: text trimming for a given height vertical alignment Can
I ran into the alignment issues with IE6.Code works just fine with IE8.I have
I need to draw vertical and horizontal rectangle / bands (like in Gantt charts)
I am trying to add vertical and horizontal scrollbars to my UserControl with the
I'm creating a dynamically generated PDF using FPDF. My PDF requires many exactly horizontal/vertical
I am trying to make Layout that contains 2 layout, vertical and horizontal scrolls.
How can i make the Legend Horizontal or Vertical.
I was asked to implement a menu bar that is neither horizontal nor vertical.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.