473,386 Members | 2,129 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.

DIV width problem, 100%

I have the following code in an ASPX- page:

<DIV id="header" style="Z-INDEX: 102"></DIV>

I render it using a CSS:

#header {

background: #0D3D91;

position: absolute;

top: 0px;

left: 0px;

right: 0px;

width: 100%;

height: 18px;

overflow:hidden;

}

Problem:

The DIV doesnt fill the entire width of the browser window. (IE6.0).

However if I set width = 110% it works.

Does somebody know why 100% sometimes isnt 100%?
Nov 19 '05 #1
5 1499
kurt sune wrote:
The DIV doesnt fill the entire width of the browser window. (IE6.0).
However if I set width = 110% it works.

Does somebody know why 100% sometimes isnt 100%?


Have you tried not positioning it absolutely?
Otherwise, is it within another element (e.g. a table or another div) that
isn't set to 100%?
Nov 19 '05 #2
kurt sune wrote:

<snip>

Just tried it. Try getting rid of the:
left: 0px;
right: 0px;
attributes in the CSS.
Nov 19 '05 #3
Setting position to relative doesnt change it becoming to short.

I have only this code in the page in a ascx:
<%@ Control Language="vb" AutoEventWireup="false"
Codebehind="HeaderUC.ascx.vb" Inherits="SimplePageInherit.HeaderUC"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<DIV id="header" style="Z-INDEX: 102"></DIV>
<DIV id="header2" style="Z-INDEX: 103"></DIV>
<DIV id="header3" style="Z-INDEX: 101"></DIV>
It becomes too short also when I put the code in a web custom control.

It works when the HTML is placed directly in the aspx.

/k

"Leon Mayne [MVP]" <l.*********@uea.ac.uk> wrote in message
news:OG**************@tk2msftngp13.phx.gbl...

Have you tried not positioning it absolutely?
Otherwise, is it within another element (e.g. a table or another div) that
isn't set to 100%?

Nov 19 '05 #4
by removing
left: 0px;

right: 0px;

it becomes to short both left and right.

/k

"Leon Mayne [MVP]" <l.*********@uea.ac.uk> wrote in message
news:uV**************@TK2MSFTNGP15.phx.gbl...
kurt sune wrote:

<snip>

Just tried it. Try getting rid of the:
left: 0px;
right: 0px;
attributes in the CSS.

Nov 19 '05 #5
Correction:

by removing
left: 0px;
right: 0px;

it becomes to short both left and right.if the code is in a web custom
control

it becomes to short left if the code is in an ascx

/k

"Leon Mayne [MVP]" <l.*********@uea.ac.uk> wrote in message
news:uV**************@TK2MSFTNGP15.phx.gbl...
kurt sune wrote:

<snip>

Just tried it. Try getting rid of the:
left: 0px;
right: 0px;
attributes in the CSS.

Nov 19 '05 #6

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

Similar topics

7
by: Graham J | last post by:
Apologies for the partial post that mysteriously escaped as I was composing. I shall try again. For many years I have been happily and successfully coding tables such that the WIDTH specified...
8
by: BiNZGi | last post by:
Hi I have reduced the problem to this code: <form> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td><input type="text" style="width: 100%;" value="Lorem ipsum dolor...
5
by: Chris Leipold | last post by:
Hi, I have a problem with an element of 100% width and a left paddig. The effect I try to achieve is easy, take a look at: http://swing-tanzen-verboten.de/test.html My Problem is, the width...
4
by: Alex Meier | last post by:
I have the following problem: I need a simple, tabular layout in a webshop. - left column: navigation column with approx. 170px width - right column: content area the goal: the left column...
4
by: Hiwj | last post by:
I am having a problem with a cell in a table in ASP.NET which used to work OK in classic ASP. I have one cell in a row where the width should be 22 pixels and the other cell should take up the...
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>...
6
by: Hacking Bear | last post by:
Hi, I still don't quite fully understand how to handle mixing border/margin pixel width with percentage width. In the example below, I want to place side-by-side two DIV boxes inside a box....
3
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...
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
pradeepjain
by: pradeepjain | last post by:
I have a 3 column layout left<->content<->right<->.I made a css and html in such a manner that when there is no left sidebar the content region starts from left side and takes whole width of left on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.