473,624 Members | 2,121 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Table with 100% width of page instead of page in IE7

I set a table with 100% width to occupy all available space, but in
IE7 it uses more than that, it uses 100% of the page width instead of
100% of the table container. Could you test the page in IE7 and in
other browsers please?

http://auriance.com/docs/tmp/test.html

I'd like the main content and the right menu on the same level. It's
working fine in most browsers except in IE7. Do you know how I can fix
it?
Thanks.

Oct 25 '07 #1
16 3095
Ok, I found out. If I set the container to width: 100%, then the table
fits properly.

Oct 26 '07 #2
In article
<11************ **********@22g2 000hsm.googlegr oups.com>,
"Charles A. Landemaine" <la********@gma il.comwrote:
I set a table with 100% width to occupy all available space, but in
IE7 it uses more than that, it uses 100% of the page width instead of
100% of the table container. Could you test the page in IE7 and in
other browsers please?

http://auriance.com/docs/tmp/test.html

I'd like the main content and the right menu on the same level. It's
working fine in most browsers except in IE7. Do you know how I can fix
it?
Thanks.
Put in a 4.01 Strict doctype:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

right at the top of your html page and this should fix.

--
dorayme
Oct 26 '07 #3
On Oct 25, 11:03 pm, dorayme <doraymeRidT... @optusnet.com.a uwrote:
Put in a 4.01 Strict doctype:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

right at the top of your html page and this should fix.

Thanks dorayme. The problem is that with a doctype I can't enable
quirks mode to use all page height to center a page vertically.

Charles.
Oct 26 '07 #4
rf

"Charles A. Landemaine" <la********@gma il.comwrote in message
news:11******** **************@ z9g2000hsf.goog legroups.com...
On Oct 25, 11:03 pm, dorayme <doraymeRidT... @optusnet.com.a uwrote:
>Put in a 4.01 Strict doctype:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

right at the top of your html page and this should fix.


Thanks dorayme. The problem is that with a doctype I can't enable
quirks mode to use all page height to center a page vertically.
Then you are screwed. Standards mode does not centre "vertically ".

You are solving the wrong problem. You should be looking into why you need
to centre a "page" vertically. Vertically in what? The current viewport?
Why? What does this gain your viewer?

Invoking quirks mode in the couple of browsers that support it is not the
solution.

If you show us what you have to date, even the quirks mode version, we may
be able to help. URL?

--
Richard.

Oct 26 '07 #5
In article <Tz************ *****@news-server.bigpond. net.au>,
"rf" <rf@invalid.com wrote:
"Charles A. Landemaine" <la********@gma il.comwrote in message
news:11******** **************@ z9g2000hsf.goog legroups.com...
On Oct 25, 11:03 pm, dorayme <doraymeRidT... @optusnet.com.a uwrote:
Put in a 4.01 Strict doctype:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

right at the top of your html page and this should fix.

Thanks dorayme. The problem is that with a doctype I can't enable
quirks mode to use all page height to center a page vertically.

Then you are screwed. Standards mode does not centre "vertically ".

You are solving the wrong problem. You should be looking into why you need
to centre a "page" vertically. Vertically in what? The current viewport?
Why? What does this gain your viewer?

Invoking quirks mode in the couple of browsers that support it is not the
solution.

If you show us what you have to date, even the quirks mode version, we may
be able to help. URL?
Yes, I agree with rf, it is highly unlikely to be a good
solution. The doctype that made your problem disappear on my
Winbox is almost certainly more advantageous overall than a
couple of tactical advantages you may have found. What exactly is
it that you want to vertically centre? Is it something small that
is somehow more attractive on most?/average?/medium?
screens/browser sizes?

--
dorayme
Oct 26 '07 #6
On Oct 26, 8:54 am, "rf" <r...@invalid.c omwrote:
Then you are screwed. Standards mode does not centre "vertically ".
Yeah, I know, the view port stops where the content stops and not in
the lower boundary of the screen.
You are solving the wrong problem. You should be looking into why you need
to centre a "page" vertically. Vertically in what? The current viewport?
Why? What does this gain your viewer?
Yes, centered vertically and horizontally in the browser. I can
achieve it in quirks mode:

http://auriance.com/docs/tmp/notcenter.html

If I add the doctype, I'm in standard mode and it doesn't work
anymore:

http://auriance.com/docs/tmp/notcenter.html
Invoking quirks mode in the couple of browsers that support it is not the
solution.
Ok, I actually can achieve it in standard mode but only stuffing the
code with javascript and lately I have dropped it, I'm using quirks
mode with less code. If you have another suggestion, please let me
know.
Thanks,

Charles.

Oct 26 '07 #7
On 2007-10-26, Charles A. Landemaine <la********@gma il.comwrote:
[...]
http://auriance.com/docs/tmp/notcenter.html
[...]
Ok, I actually can achieve it in standard mode but only stuffing the
code with javascript and lately I have dropped it, I'm using quirks
mode with less code. If you have another suggestion, please let me
know.
Well, this should work in strict mode in Firefox, Opera and Konqueror:

html, body
{
margin: 0;
padding: 0;
height: 100%; /* I suspect this is what quirks mode is giving
you in this case */
}
table
{
width: 100%;
height: 100%;
}
td
{
/* These are preferable to align="center" */
vertical-align: middle;
text-align: center;
}

<body>
<table>
<tr>
<td>Centre of screen</td>
</tr>
</table>
</body>
Oct 26 '07 #8
In article
<11************ **********@57g2 000hsv.googlegr oups.com>,
"Charles A. Landemaine" <la********@gma il.comwrote:
... centered vertically and horizontally in the browser. I can
achieve it in quirks mode:

http://auriance.com/docs/tmp/notcenter.html

If I add the doctype, I'm in standard mode and it doesn't work
anymore:

http://auriance.com/docs/tmp/notcenter.html
?

--
dorayme
Oct 26 '07 #9
On Oct 26, 5:54 pm, Ben C <spams...@spam. eggswrote:
Well, this should work in strict mode in Firefox, Opera and Konqueror:

html, body
{
margin: 0;
padding: 0;
height: 100%; /* I suspect this is what quirks mode is giving
you in this case */
}
table
{
width: 100%;
height: 100%;
}
td
{
/* These are preferable to align="center" */
vertical-align: middle;
text-align: center;
}

<body>
<table>
<tr>
<td>Centre of screen</td>
</tr>
</table>
</body>


Thanks, indeed, it's working fine: http://auriance.com/docs/tmp/xhtml.html
I could remove safely "padding: 0;" from html, body, it's still
working fine. What I don't understand is that the browsers consider
the viewport is all the window and not the content (just one line).
What do you think?
Thanks anyway :-)

Charles.

Oct 27 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
5170
by: kie | last post by:
hello, i have a table that creates and deletes rows dynamically using createElement, appendChild, removeChild. when i have added the required amount of rows and input my data, i would like to calculate the totals in each row. when i try however, i receive the error: "Error: 'elements' is null or not an object"
0
1506
by: Thomas Scheiderich | last post by:
I have a table that has 3 image slices. The middle slice changes size based on size of browser window. This works great. My client wants the date to show over the image on the right. So what I did was cut off the top part of the image (which is just a solid color and I can handle by making the background-color of the cell this color). I then use a asp line to display the date, which also works. Here is the original table setup for...
3
1560
by: Pavan | last post by:
Hi All, I am having a wierd problem while displaying my panel. My code is something like this <table> <tr> <td width=100>label</td> <td width=100>label</td> <td width=100>label</td> <td width=100>button in this cell</td>
4
1778
by: Arthur Dent | last post by:
Hello all... i have a really frsutrating problem here... This is only happening in IE (6 & 7b2), Mozilla and Netscape are both OK. I have a top-level table with a width of 760px, so it should be 760 minimum and stretching wider as needed to fit content (such as bound datagrids). In the top TR/TD, i have a header table which is width of 100%, and has three TD's. Each contains one image file, with the middle TD being set to width 100%. So...
117
18485
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of elements in the HTML to get everything just right. When you consider the class attribute on the DIV elements, there's not much size savings anymore for using DIV. There are other disadvantages to not using TABLE/TR/TD, such as the lack of ability...
7
1604
by: Jeff | last post by:
hey gang. i have a question that is probably simple, and i could do it at one time, but i forget how. ok, how to explain i need to retrieve records from a db. which is no problem. but instead of displaying them with normal rows, i need to display them across 2 columns, then down. here is the example
3
2916
by: McKirahan | last post by:
I have a Web page that uses some JavaScript and CSS. I have specified a three column table with a fixed-width left and right side; the center colum expands to fill the page. Within this portion of the table I have another table that specifies "display:none" to hide it. When the page loads, if JavaScript is enabled then it will change to "display:block". However, the problem under Firefox is that the width of
1
7529
Merlin1857
by: Merlin1857 | last post by:
How to search multiple fields using ASP A major issue for me when I first started writing in VB Script was constructing the ability to search a table using multiple field input from a form and having the sql statement dynamically built according to the input provided by the user. I have used the method described here hundreds of times it is quick and adaptive. I generally use a frames page for the search, in this way the search is maintained...
0
1256
by: vozzek | last post by:
EDIT: Nevermind, I fixed this by using a <BR /> instead of trying to write option_a to a new row of the table. Thanks all! Hi all, This has been haunting me for over a day now, and I can't understand what's wrong with it. My shopping cart table's format is misaligned, and I have no clue why. Please help! My PHP code is pulling the cart contents from my SQL database, and then generating html to create the format. The html looks fine,...
0
8236
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8173
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8475
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7159
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5563
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.