473,386 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

100% width of div in IE

Hello,

I try to figure out, how I can define a div (using css) which is spread over
the whole page. The example below is how I think it should work, but when
using the Internet Explorer it doesn't work - the margin-left and
margin-right of the body is always subtracted from the width, and the div
is displayed in the top-left corner, but it does not fill the full
page-width - a white space on the right side (margin-left + marging-right)
of the body is shown (in IE and Opera). Mozilla, Firebird, Konqueror show
the div correctly.

div.full{
****position:*absolute;
****top:*0px;*left:*0px;*width:100%;*right:auto;
**}

Does anybody know a workaround for IE, or is it really impossible to set a
div to 100% width when the body contains a margin?

Greetings
--
Anita Meyer
an*********@aon.at
Jul 20 '05 #1
1 13328
If you are talking about IE 5.5, that is how it works. There are hacks to
get around it. Look at http://glish.com/css/hacks.asp.

If you are just interested in IE6, you can use a doctype to make it stop
using "quirks mode" (IE5.5 compatibility) and force it into standards mode.
Look at http://www.hut.fi/~hsivonen/doctype.html.

--
--
Jim McMaster
mailto: ji**********@comcast.net
"Anita Meyer" <an*********@aon.at> wrote in message
news:40***********************@newsreader01.highwa y.telekom.at...
Hello,

I try to figure out, how I can define a div (using css) which is spread over the whole page. The example below is how I think it should work, but when
using the Internet Explorer it doesn't work - the margin-left and
margin-right of the body is always subtracted from the width, and the div
is displayed in the top-left corner, but it does not fill the full
page-width - a white space on the right side (margin-left + marging-right)
of the body is shown (in IE and Opera). Mozilla, Firebird, Konqueror show
the div correctly.

div.full{
position: absolute;
top: 0px; left: 0px; width:100%; right:auto;
}

Does anybody know a workaround for IE, or is it really impossible to set a
div to 100% width when the body contains a margin?

Greetings
--
Anita Meyer
an*********@aon.at

Jul 20 '05 #2

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

Similar topics

2
by: patrick h. | last post by:
Greetings, I am encountering some issues regarding using float while desiring to set the height to 100%. This is likely due to my own misunderstanding of the way things actually function -- any...
5
by: John Smith | last post by:
Here is my HTML table formatting code. <table border="1" width="100%"> <tr width = "100%"> <td width="33%">11asdhagdshaskgashjgahjgadhjgdjshdgasjdgajdgadjhgdgahjdgadhjsgad
50
by: Shadow Lynx | last post by:
Consider this simple HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head>...
17
by: Mike | last post by:
I'm trying to create a page: Three sections (left, topright and bottomright), each with a heading and scrolling (overflow) content. The size of these sections should be based upon the size of the...
4
by: reycri | last post by:
I have a page that works as I intend in IE but not in Firefox: <html> <head> <title>Overflow Test</title> </head> <body style='overflow:hidden; margin:0; padding:0;'> <table border='0'...
0
by: Markus Olderdissen | last post by:
i want to create my page with 100% height. <table height="100%"works but is not correct by default. i saw various information how to do it with stylesheet. i really have problems to create my page....
11
by: yawnmoth | last post by:
How do you get both of these div's to have a 100% width? (1): <div style="float: left; background: black; color: white">Hello, world! </div> <div style="clear: both; background: blue; color:...
4
by: lilOlMe | last post by:
Hi there! I'm developing a "scrollable table". At first I started using CSS. It worked pretty well until I found a bug that happens when placing this table into a tabbing control... So I...
1
by: psion | last post by:
Hi, We have a gridview on a webpage, which we would like to be 100% of the table cell in which it is placed. When we specify the width to be 100%, this has no effect, but only if we specify a...
1
by: Meganutter | last post by:
Hello, i am having some troubles with DIVs. heres my setup i have a wrapper, 900px wide 100% height nested header 100% wide 20px high nested menubar 100%wide 80px high
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.