Firefox displays too high table

Discussion in 'HTML' started by D_W, Jul 27, 2007.

  1. D_W

    D_W Guest

    Hi, Quick question.

    I have a .net page that uses css styles and frames.

    the menu needs a border around and I have it in a table with a border

    so

    html, body and form all have style=height:100%
    I also put the style height:100% on the table.

    It works nice in I.E as usual but in firefox the table gets bigger
    than the screen by a few pixels creating a scroll bar..

    any solution to this?


    *CODE
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
    www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <body id="bodytag" topmargin="0" bottommargin="0" rightmargin="0"
    onload="initMenu();">
    <form name="form1" method="post" action="menu.aspx" id="form1">
    <div>
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
    value="[CUT]" />
    </div>

    <table width="170" cellpadding="0" cellspacing="0" style="border:
    solid 1px #000000; height:100%;">
    <tr>
    <td valign="top">
    CONTENT OF MENU
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>

    AND HERE IS THE CSS
    html {height:100%;}
    body { height:100%; }
    form { height:100%;}
     
    D_W, Jul 27, 2007
    #1
    1. Advertising

  2. D_W wrote:
    > Hi, Quick question.


    quick answer: post a URL.

    >
    > the menu needs a border around and I have it in a table with a border
    >


    which seems to me to be a wrong approach: why would you want to put a
    menu into a table? AFAIK menus are not tabular-data, hence should not be
    represented by a menu (a unordered list would be more appropriate).


    >
    > It works nice in I.E as usual but in firefox the table gets bigger
    > than the screen by a few pixels creating a scroll bar..


    post a URL, so that we can see what you mean.

    >
    > any solution to this?


    if it works 'nice' in IE, but not in FF, you might consider revising
    your source as this is always a hint that something is wrong with it.
    Consider IE as the most 'broken'-UA out there.

    HTH
    bernhard

    --
    www.daszeichen.ch
    remove nixspam to reply
     
    Bernhard Sturm, Jul 27, 2007
    #2
    1. Advertising

  3. D_W

    D_W Guest

    On 27 Juli, 16:57, Bernhard Sturm <> wrote:
    > D_W wrote:
    > > Hi, Quick question.

    >
    > quick answer: post a URL.
    >
    >
    >
    > > the menu needs a border around and I have it in a table with a border

    >
    > which seems to me to be a wrong approach: why would you want to put a
    > menu into a table? AFAIK menus are not tabular-data, hence should not be
    > represented by a menu (a unordered list would be more appropriate).
    >
    >
    >
    > > It works nice in I.E as usual but in firefox the table gets bigger
    > > than the screen by a few pixels creating a scroll bar..

    >
    > post a URL, so that we can see what you mean.
    >
    >
    >
    > > any solution to this?

    >
    > if it works 'nice' in IE, but not in FF, you might consider revising
    > your source as this is always a hint that something is wrong with it.
    > Consider IE as the most 'broken'-UA out there.
    >
    > HTH
    > bernhard
    >
    > --www.daszeichen.ch
    > remove nixspam to reply



    Here you go
    http://www.swespy.se/nya/index.htm
     
    D_W, Jul 27, 2007
    #3
  4. D_W

    Andy Dingley Guest

    On 27 Jul, 08:59, D_W <> wrote:

    > I have a .net page that uses css styles and frames.


    There are not ".NET pages". .NET is sourcecode for a server which then
    makes a plain old HTML page from it. You can (and should) fix layout
    problems by working with the HTML and CSS alone. Worry about the .NET
    you need to make them with later.

    You're also not using CSS, or at least if you are, you're also using a
    great deal of HTML 3.2 presentational markup in there too. No wonder
    it's hard to see what's going on.

    * Lose the XHTML, just use HTML 4.01 Strict

    * Lose the transitional doctype, just use HTML 4.01 Strict

    * Lose the HTML 3.2 presentational markup, just use HTML 4.01 Strict

    * Lose the frames. You've got a powerful server to use here, do it
    with SSI instead.

    * Lose the Dreamweaver boilerplate JavaScript. You don't need it.

    * Re-code your HTML as minimal semantic HTML, just the content and no
    presentation. Apply CSS (and probably a few extra <div>, classes etc.)
    as necessary to get the look right.

    * Consider replacing the central product list table with a single
    linear list of <div> instead, using float:left;. This re-sizes better
    for varying browser window widths. In most cases it looks just like a
    table, it's just a bit more flexible.

    If you work hard, you _might_ get your current HTML 3.2 code to work.
    However it will be hard to do this, you'll produce an inflexible
    design at the end, and you're likely to get no help locally as the
    clueful people have already worked on more than enough HTML 3.2 and
    don't want to see any more.
     
    Andy Dingley, Jul 27, 2007
    #4
  5. D_W

    D_W Guest

    On 27 Juli, 18:07, Andy Dingley <> wrote:
    > On 27 Jul, 08:59, D_W <> wrote:
    >
    > > I have a .net page that uses css styles and frames.

    >
    > There are not ".NET pages". .NET is sourcecode for a server which then
    > makes a plain old HTML page from it. You can (and should) fix layout
    > problems by working with the HTML and CSS alone. Worry about the .NET
    > you need to make them with later.
    >
    > You're also not using CSS, or at least if you are, you're also using a
    > great deal of HTML 3.2 presentational markup in there too. No wonder
    > it's hard to see what's going on.
    >
    > * Lose the XHTML, just use HTML 4.01 Strict
    >
    > * Lose the transitional doctype, just use HTML 4.01 Strict
    >
    > * Lose the HTML 3.2 presentational markup, just use HTML 4.01 Strict
    >
    > * Lose the frames. You've got a powerful server to use here, do it
    > with SSI instead.
    >
    > * Lose the Dreamweaver boilerplate JavaScript. You don't need it.
    >
    > * Re-code your HTML as minimal semantic HTML, just the content and no
    > presentation. Apply CSS (and probably a few extra <div>, classes etc.)
    > as necessary to get the look right.
    >
    > * Consider replacing the central product list table with a single
    > linear list of <div> instead, using float:left;. This re-sizes better
    > for varying browser window widths. In most cases it looks just like a
    > table, it's just a bit more flexible.
    >
    > If you work hard, you _might_ get your current HTML 3.2 code to work.
    > However it will be hard to do this, you'll produce an inflexible
    > design at the end, and you're likely to get no help locally as the
    > clueful people have already worked on more than enough HTML 3.2 and
    > don't want to see any more.


    All that would be fine, but all I want to do is make the table 100% of
    the frame like it shows in IE and not a few pixels bigger like in
    firefox.
    There must be some basic error that makes the page render "taller" in
    firefox than in IE.
     
    D_W, Jul 27, 2007
    #5
  6. D_W wrote:
    >
    >
    > Here you go
    > http://www.swespy.se/nya/index.htm
    >


    Thanks... You are using frames, get rid of them. Frames are evil to
    search-engines and users (try to print you page once, try to access it
    with a screen-reader).

    Then: you are mixing layout and structural represantation in your
    source. Avoid this. This will lead you to table-less designs: your menu
    is wrapped into a table, drop this table and try to set up your menu as
    a unordered list:

    <ul>
    <li>Menu Item 1</li>
    <li>Menu Item 2</li>
    </ul>

    you can wrap your menu into a <div> container, in order to get your
    desired borders.
    I believe you could go away with your design if you google for something
    like: liquid two column layout. This could help for a start:
    http://www.nysforum.org/documents/html/css-9-21-05/twocolumn/liquid.html

    HTH
    bernhard


    --
    www.daszeichen.ch
    remove nixspam to reply
     
    Bernhard Sturm, Jul 27, 2007
    #6
  7. D_W wrote:

    >
    > All that would be fine, but all I want to do is make the table 100% of
    > the frame like it shows in IE and not a few pixels bigger like in
    > firefox.


    'fine' is not an option :) try to design your document according to
    what Andy told you, you will get rid a lot of the troubles that you
    don't know yet, but are burried within your page.

    > There must be some basic error that makes the page render "taller" in
    > firefox than in IE.
    >


    The 'basic error' are the ones, Andy has pointed out to you. If you
    follow his advice your problems will get solved.

    bernhard



    --
    www.daszeichen.ch
    remove nixspam to reply
     
    Bernhard Sturm, Jul 27, 2007
    #7
  8. D_W

    John Hosking Guest

    D_W wrote:
    > On 27 Juli, 18:07, Andy Dingley <> wrote:
    >> On 27 Jul, 08:59, D_W <> wrote:
    >>
    >>> I have a .net page that uses css styles and frames.


    >> You're also not using CSS, or at least if you are, you're also using a
    >> great deal of HTML 3.2 presentational markup in there too. No wonder
    >> it's hard to see what's going on.


    >> * Lose the frames. You've got a powerful server to use here, do it
    >> with SSI instead.


    I can't even tell which of the seven frames/sources I should look in.

    Anyway, I don't see the problem. In FF I see a vertical scrollbar to the
    right of the product display part (all lower than nav menu I think
    you're talking about). In IE6, I see a vertical and a horizontal
    scrollbar for the same section.

    >
    > All that would be fine, but all I want to do is make the table 100% of
    > the frame like it shows in IE and not a few pixels bigger like in
    > firefox.
    > There must be some basic error that makes the page render "taller" in
    > firefox than in IE.


    Not necessarily. You do know that different browsers[1] render some
    things[2] differently, don't you?

    [1] and what is IE if not different?
    [2] Most notably, spacing around and between elements.

    --
    John
     
    John Hosking, Jul 27, 2007
    #8
  9. D_W wrote:

    > All that would be fine, but all I want to do is make the table 100% of
    > the frame like it shows in IE and not a few pixels bigger like in
    > firefox.
    > There must be some basic error that makes the page render "taller" in
    > firefox than in IE.
    >


    Yes you are right there is an error but not in FF but *MSIE*. If you
    have a table set to 100% of the containing element (height or width) AND
    you add a border, the border is *added* to the dimension which is >100%.
    If you trigger quirks mode IE does not add the border to the height
    which is incorrect. Now if you fix the errors that others have informed
    you and work with an HTML 4.01 strict you will have a better chance of
    getting *MSIE* to play nice with the rules and more likely to get
    x-browser consistency.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Jul 27, 2007
    #9
  10. D_W wrote:

    > All that would be fine, but all I want to do is make the table 100% of
    > the frame like it shows in IE and not a few pixels bigger like in
    > firefox.


    A few pixels? Maybe ... three?

    http://www.positioniseverything.net/explorer/threepxtest.html

    > There must be some basic error that makes the page render "taller" in
    > firefox than in IE.


    You will never get absolute pixel precision across multiple browsers.
    You will have much better luck if you follow Bernhard's advice to dump
    the frames, the antiquated last-century markup, and use a normal
    two-column CSS layout.

    Your visitors - most importantly including search engines - will
    appreciate it.

    --
    -bts
    -Motorcycles defy gravity; cars just suck
     
    Beauregard T. Shagnasty, Jul 27, 2007
    #10
  11. D_W

    34107 Guest

    D_W <> wrote in
    news::

    > On 27 Juli, 16:57, Bernhard Sturm <> wrote:
    >> D_W wrote:
    >> > Hi, Quick question.

    >>
    >> quick answer: post a URL.
    >>
    >>
    >>
    >> > the menu needs a border around and I have it in a table with a border

    >>
    >> which seems to me to be a wrong approach: why would you want to put a
    >> menu into a table? AFAIK menus are not tabular-data, hence should not
    >> be
    >> represented by a menu (a unordered list would be more appropriate).
    >>
    >>
    >>
    >> > It works nice in I.E as usual but in firefox the table gets bigger
    >> > than the screen by a few pixels creating a scroll bar..

    >>
    >> post a URL, so that we can see what you mean.
    >>
    >>
    >>
    >> > any solution to this?

    >>
    >> if it works 'nice' in IE, but not in FF, you might consider revising
    >> your source as this is always a hint that something is wrong with it.
    >> Consider IE as the most 'broken'-UA out there.
    >>
    >> HTH
    >> bernhard
    >>
    >> --www.daszeichen.ch
    >> remove nixspam to reply

    >
    >
    > Here you go
    > http://www.swespy.se/nya/index.htm
    >


    Erm, 391 validation errors!

    It might be an idea to fix these first - you never know, your height
    problem might then disappear!
    --
    www.lightningnews.com Lightning fast anonymous usenet downloads for 5$ only !
     
    34107, Jul 27, 2007
    #11
  12. D_W

    D_W Guest

    I did find what might be causing the problem.
    In I.E the framecontent actually gets aligned to the frameborder but
    in Firefox there is a 5px "padding" from all frameborders..
    Now all I need to do is find where to change this and I'm home free..
     
    D_W, Jul 27, 2007
    #12
  13. D_W

    D_W Guest

    On 27 Juli, 20:54, D_W <> wrote:
    > I did find what might be causing the problem.
    > In I.E the framecontent actually gets aligned to the frameborder but
    > in Firefox there is a 5px "padding" from all frameborders..
    > Now all I need to do is find where to change this and I'm home free..


    Margin:0px solved it..
    As for all you guys complaining about frames.. yes I know, I started
    building the page using master files and style positioning but the guy
    I'm building for didn't want that, he wanted frames so I give him what
    he wants.
     
    D_W, Jul 27, 2007
    #13
  14. D_W

    Andy Dingley Guest

    On Fri, 27 Jul 2007 03:19:58 -0700, D_W
    <> wrote:

    >All that would be fine, but all I want to do is make the table 100% of
    >the frame like it shows in IE and not a few pixels bigger like in
    >firefox.


    If your HTML 3.2 approach is working for you, then stick with it.

    However it isn't, and you've no real direction to make further progress
    in fixing it. When you're up a dead end, turn around. Console yourself
    with the thought you will know not to go that way again.
     
    Andy Dingley, Jul 27, 2007
    #14
  15. D_W

    dorayme Guest

    In article
    <>,
    D_W <> wrote:

    > On 27 Juli, 20:54, D_W <> wrote:
    > > I did find what might be causing the problem.
    > > In I.E the framecontent actually gets aligned to the frameborder but
    > > in Firefox there is a 5px "padding" from all frameborders..
    > > Now all I need to do is find where to change this and I'm home free..

    >
    > Margin:0px solved it..
    > As for all you guys complaining about frames.. yes I know, I started
    > building the page using master files and style positioning but the guy
    > I'm building for didn't want that, he wanted frames so I give him what
    > he wants.


    There should be a lowly cousin of alt.html where the rule is that
    the least effort short term solution to questions are sought and
    given.

    --
    dorayme
     
    dorayme, Jul 27, 2007
    #15
  16. D_W

    Neredbojias Guest

    Well bust mah britches and call me cheeky, on Fri, 27 Jul 2007 22:41:37 GMT
    dorayme scribed:

    > In article
    > <>,
    > D_W <> wrote:
    >
    >> On 27 Juli, 20:54, D_W <> wrote:
    >> > I did find what might be causing the problem.
    >> > In I.E the framecontent actually gets aligned to the frameborder but
    >> > in Firefox there is a 5px "padding" from all frameborders..
    >> > Now all I need to do is find where to change this and I'm home free..

    >>
    >> Margin:0px solved it..
    >> As for all you guys complaining about frames.. yes I know, I started
    >> building the page using master files and style positioning but the guy
    >> I'm building for didn't want that, he wanted frames so I give him what
    >> he wants.

    >
    > There should be a lowly cousin of alt.html where the rule is that
    > the least effort short term solution to questions are sought and
    > given.


    How about sub.html?

    Oh, I forgot, I'm not talking to you because you're a bitch.

    --
    Neredbojias
    Half lies are worth twice as much as whole lies.
     
    Neredbojias, Jul 28, 2007
    #16
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chumley Walrus
    Replies:
    1
    Views:
    12,187
    =?Utf-8?B?QnJpYW4gQnJvd24=?=
    Dec 16, 2004
  2. David Smithz
    Replies:
    6
    Views:
    1,586
    David Smithz
    Apr 30, 2006
  3. Yofnik
    Replies:
    3
    Views:
    489
    Yofnik
    Jan 27, 2007
  4. Mike Barnard
    Replies:
    3
    Views:
    441
    Toby A Inkster
    Mar 5, 2007
  5. Preben Zacho

    RequiredFieldvalidator displays error too early

    Preben Zacho, Oct 23, 2007, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    181
    john123
    Oct 30, 2007
Loading...

Share This Page