473,834 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to make divs reach edges of browser window?

I have looked and looked and not found the answer to this one - just
lots of references to this or that "hack" that is supposed to fix the
problem (and it is a problem to some people).

If I have a div specified and want it to reach across the full width
of the browser window, it doesn't. There is an approximately 10-pixel
margin on either end of the div. I can "fix" this by setting my left
and right margins to -10px, but by doing so, I get the feeling that
I'm doing something that was never intended.

So first, why DON'T div's naturally, as far as I can tell, touch the
edges of the browser window. And second, what is the right/best/
least worst/"correct" way to make them touch the browser window edges.

See the following html:

<html>
<head>

<style type="text/css">
<!--
..bluearea {
margin: 0px;
padding: 5px;
width: auto;
color: white;
background-color: blue;
}
..redarea {
margin-left: -10px;
margin-right: -10px;
padding: 5px;
width: auto;
color: white;
background-color: red;
}
-->
</style>

</head>
<body>

<div class="bluearea ">
Why does this blue band not touch the edges of the browser window?
</div>

<div class="redarea" >
While this red band does?
</div>

</body>
</html>

Jul 20 '05
18 10685
rf

"Stan Brown" <th************ @fastmail.fm> wrote in message
news:MP******** *************** *@news.odyssey. net...
It seems "rf" wrote in comp.infosystem s.www.authoring.stylesheets in
article <Kh************ ****@news-server.bigpond. net.au>:

Ah, but what EST? I'll just bet it means eastern standard USA time, not ESTAustralia :-)


That's AEST not EST, according to
http://www.koalanet.com.au/wtzabb.html
Note what country hosts that page.


Then why is not the time in New York listed in USAEST?

Over here we use EST for our time. You should use something else. EST is
*ours* :-)

Cheers
Richard.

Jul 20 '05 #11
rf

"Toby A Inkster" <Us************ ******@deadspam .com> wrote in message
news:pa******** *************** *****@goddamn.c o.uk...
Stan Brown wrote:
Anyone know where (or if) there's an ISO standard list on line?


Names of timezones have never been standardised, but a good
pseudo-standard might be the table in getdate.c, part of the GNU
"sh-utils" package.

The table is reproduced below, and may be distributed under the GPL.
http://www.gnu.org/copyleft/gpl.html

/* The time zone table. This table is necessarily incomplete, as time
zone abbreviations are ambiguous; e.g. Australians interpret "EST"
as Eastern time in Australia, not as US Eastern Standard Time.
You cannot rely on getdate to handle arbitrary time zone
abbreviations; use numeric abbreviations like `-0500' instead. */


brucie (see his sig) use military time. It's now 13:29Kilo.

http://www.koalanet.com.au/milabb.html

<snip table which, I notice, fails to include Australia, even though it does
include those kiwis across the puddle>

Cheers
Richard.
Jul 20 '05 #12
While sitting in a puddle rf scribbled in the mud:
<snip table which, I notice, fails to include Australia,


K Kilo UTC +10 hours Vladivostok (Russia), Papua New Guinea, Eastern
Australia

--
Duende
Jul 20 '05 #13
rf wrote:
"Toby A Inkster" <Us************ ******@deadspam .com> wrote in message
news:pa******** *************** *****@goddamn.c o.uk...
Names of timezones have never been standardised, but a good
pseudo-standard might be the table in getdate.c, part of the GNU
"sh-utils" package.

The table is reproduced below, and may be distributed under the GPL.
http://www.gnu.org/copyleft/gpl.html

/* The time zone table. This table is necessarily incomplete, as time
zone abbreviations are ambiguous; e.g. Australians interpret "EST"
as Eastern time in Australia, not as US Eastern Standard Time.
You cannot rely on getdate to handle arbitrary time zone
abbreviations; use numeric abbreviations like `-0500' instead. */


brucie (see his sig) use military time.


As it happens, military time is given in the table after the time zone
table in getdate.c

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

Jul 20 '05 #14
rf

"Duende" <xx*****@wipkip .biz> wrote in message
news:Xn******** *************** *******@130.133 .1.4...
While sitting in a puddle rf scribbled in the mud:
<snip table which, I notice, fails to include Australia,


K Kilo UTC +10 hours Vladivostok (Russia), Papua New Guinea, Eastern
Australia


Sorry Duende, my quoting was a bit off. The table I snipped containing the
missing Australia stuff was the one posted by Toby, not the one at the URL I
quoted.

In any case K is still not adequate. Sydney and Vladivostok have
diametrically opposed views on when daylight saving operates :-)

<grin> Even brucie up in QLD runs on a different clock at the moment.
</grin>

Cheers
Richard.
Jul 20 '05 #15
On Wed, 14 Jan 2004 02:31:12 GMT, rf "rf" <ma**********@t he.time>
declared in comp.infosystem s.www.authoring.stylesheets,alt.html:

brucie (see his sig) use military time. It's now 13:29Kilo.


It's not in his sig any more. I think he changes his sig more often that
his underpants. :-)

--
Mark Parnell
http://www.clarkecomputers.com.au
Jul 20 '05 #16
rf

"Mark Parnell" <we*******@clar kecomputers.com .au> wrote in message
news:1w******** *************** ********@40tude .net...
On Wed, 14 Jan 2004 02:31:12 GMT, rf "rf" <ma**********@t he.time>
declared in comp.infosystem s.www.authoring.stylesheets,alt.html:

brucie (see his sig) use military time. It's now 13:29Kilo.
It's not in his sig any more.


You're right.
I think he changes his sig more often that
his underpants. :-)


Maybe he read one of his own posts and suddenly found out that it was
<shudder> daytime </shudder> outside.

Cheers
Richard.
Jul 20 '05 #17
DU <dr*******@hotR EMOVETHISmail.c om> wrote in message news:<bt******* ***@news.eusc.i nter.net>...
http://www10.brinkster.com/doctorunc...ultValues.html


That page isnt valid xhtml or css so lose the valid logos.

EC
..
Jul 20 '05 #18
Also sprach Stan Brown:
I guess they really _are_ unknown. I visited the above page and got
"unknow [sic] or not available" for every one except the one labeled
MSIE, which said "not available".


You have to wait a bit (= have your lunch break), then the "real" values
will show up.
Jul 20 '05 #19

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

Similar topics

4
7955
by: metalseb | last post by:
Hi folks I built up a small website which is designed for 800x600 display. Runs just fine in this resolution but if you have a system in 1024 or 1280 pixels wide, the site just "sticks" in the upper-left corner of the browser window. So I'm trying to keep it horizontally centered whatever screen resolution you are set in. I do not want to deal with table cells, just CSS. I think that I must have a three column DIV layout with the...
20
7950
by: Mandy Memphis | last post by:
If I perform a mousedown within a document, move the mouse outside the browser window, and then release the mouse button, the document.onmouseup event does not fire. Is there any way to detect a mouseup event outside the document? Also, how can I get the relative coordinates of the cursor while it is outside the browser? Thank you.
8
8905
by: jrefactors | last post by:
I want to maximize the browser window when I open a new window. Now I do the following, but different monitor size will yield different width and height values. window.open('index.jsp',myform.target,'toolbar=no,menubar=no,resizable=yes,scrollbars=yes,width=800,height=600'); Any ideas? please help. thanks!!
10
11626
by: santiago538 | last post by:
Hi, Is there any way to specify which monitor a Window.open() will launch a new browser window in on systems with more than one display. It would only need to work with Mozilla browsers, and not IE. Thanks!
7
1701
by: Simon Storr | last post by:
The Microsoft CRM has custom combo boxes and date calendar controls that pop up outside the current window in a floating panel (they DON'T open a sub window in the normal way - there's no title bar for a start). How do they do it? I want to do the same thing in my web app but can't find any info on how to do it... Anyone know how its done!? Thanks, Simon
3
6469
by: Jimmy | last post by:
Is it possible to open a pop-up browser window (modal-style) inside another browser? e.g. // assuming something is calling this function inside the html as some event got triggered function doSomethingInDiffWindow() { // do something // open up a pop-up modal window // continue back on doing something after pop-up modal window
8
1549
by: =?Utf-8?B?Z3V5?= | last post by:
I have done this loads of time, but need a reminder - how do i load up a new browser window from code? (Brain is fried - i have been doing Winforms!) Guy
0
1972
gauchomatt
by: gauchomatt | last post by:
I have a liquid site which expands perfectly when the browser window is larger than the actual content. However, when I decrease the browser window size to a point that it's smaller horizontally than the content, my background div's and their images start to decrease horizontally. I think it has something to do with my #main div as well as my #wrap div's. They are the ones decreasing horizontally and eliminating everything in their path...
0
9799
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
9646
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
10510
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10219
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
9331
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
6954
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
5627
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...
2
3978
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3081
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.