Firefox displays too high table

D

D_W

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%;}
 
B

Bernhard Sturm

D_W said:
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
 
D

D_W

quick answer: post a URL.




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).




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




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
 
A

Andy Dingley

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.
 
D

D_W

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.
 
B

Bernhard Sturm

D_W said:

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
 
B

Bernhard Sturm

D_W said:
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
 
J

John Hosking

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.
 
J

Jonathan N. Little

D_W said:
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.
 
B

Beauregard T. Shagnasty

D_W said:
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.
 
D

D_W

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

D_W

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.
 
A

Andy Dingley

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.
 
D

dorayme

D_W said:
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.
 
N

Neredbojias

Well bust mah britches and call me cheeky, on Fri, 27 Jul 2007 22:41:37 GMT
dorayme scribed:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,167
Latest member
SusanaSwan
Top