I am trying to put a 7px border around a page. If the contents don't fill
up the viewport, then the border must appear all around the viewport. If
the page is larger than the viewport, then the border must wrap around the
contents. Both should result in the border around the complete page, no
matter the size, so that none of the bgcolor bleeds outside of it (ie. you
can never see or scroll outside of the border). I would have thought this
would be more common than it is, but anyway...
I am trying to keep to using a doctype, preferably XHTML strict, and I'm
trying to find a method that works in all major browsers. I have tried
styling the html, body, and a 'wrapper' div, and I have tried making each
side of the border a thin div as well. I have tried various ways including
display:table on the body. Some work, some don't - with a doctype.
I have tried wrapping the entire contents in a 100% width and height 1x1
table, and this is the best solution I have found thus far. However, it
only works if the browser is in quirks mode (no doctype specified). If I
specify any doctype using this method, it only works in MSIE 5.
I have read http://www.quirksmode.org/css/100percheight.html but the
author doesn't seem to have put much effort into his 'working' examples -
put a large table in there and it bleeds over the bottom border. Also, I'm
not sure about trusting someone's advice when he chooses to go for the
quirks mode solution - it completely excludes one browser, whereas
strict+body+htm l+100% is only buggy in one minorer (sp? :-)) browser. And
where are his gecko-based results?
Is there a best method of doing this that doesn't require to be in quirks
mode and doesn't require hacking for specific browsers?
I am testing on Opera 7.23, Firebird 0.7, MSIE 6 (latest updates), MSIE
5.01 (this IS the version that comes with Win98, right?). I have yet to
test with Netscape 4.x.
Cheers.
--
.. 10 5134
"Vigil" <me@privacy.net > wrote in message
news:pa******** *************** *****@privacy.n et... I am trying to put a 7px border around a page. If the contents don't fill up the viewport, then the border must appear all around the viewport. If the page is larger than the viewport, then the border must wrap around the contents. Both should result in the border around the complete page, no matter the size, so that none of the bgcolor bleeds outside of it (ie. you can never see or scroll outside of the border). I would have thought this would be more common than it is, but anyway...
I am trying to keep to using a doctype, preferably XHTML strict, and I'm trying to find a method that works in all major browsers. I have tried styling the html, body, and a 'wrapper' div, and I have tried making each side of the border a thin div as well. I have tried various ways including display:table on the body. Some work, some don't - with a doctype.
I have tried wrapping the entire contents in a 100% width and height 1x1 table, and this is the best solution I have found thus far. However, it only works if the browser is in quirks mode (no doctype specified). If I specify any doctype using this method, it only works in MSIE 5.
I have read http://www.quirksmode.org/css/100percheight.html but the author doesn't seem to have put much effort into his 'working' examples - put a large table in there and it bleeds over the bottom border. Also, I'm not sure about trusting someone's advice when he chooses to go for the quirks mode solution - it completely excludes one browser, whereas strict+body+htm l+100% is only buggy in one minorer (sp? :-)) browser. And where are his gecko-based results?
Is there a best method of doing this that doesn't require to be in quirks mode and doesn't require hacking for specific browsers?
I am testing on Opera 7.23, Firebird 0.7, MSIE 6 (latest updates), MSIE 5.01 (this IS the version that comes with Win98, right?). I have yet to test with Netscape 4.x.
I've tried this, and I could never get it to work. Problem is, if the
element doesn't descend deep enough, the border won't get to the bottom. The
only way you can do this is to force it, say with a 750-pixel-high
transparent image along one side.
> I am trying to put a 7px border around a page. I have tried ...a 'wrapper' div, and I have tried making each side of the border a thin div as well.
Did you try superimposing two backgrounds, one slightly smaller (7px) than
the other?
e.g. in the . CSS you would write;
DIV.backbig {
margin : 0px;
border : 0px;
padding : 7px;
background : #1C1887; <!-- dark blue -->
}
DIV.backsmall {
border : 7px;
padding : 7px;
background : #CCFFFF; <!-- light blue -->
}
and in the .page.htm itself you would write
<DIV class="backbig" >
<DIV class="backsmal l">
this will produce a dark blue border around a light blue background.
--------
MH
With doctype XHTML stricht, it only works in MSIE 5.
On Tue, 23 Dec 2003 16:36:27 +0100, MH wrote: this will produce a dark blue border around a light blue background.
--
..
The 1x1 table only works in all tested browsers - except NN4 - if I
specify the doctype as HTML 3.2, but I'd prefer to use XHTML strict.
--
..
> > this will produce a dark blue border around a light blue background. With doctype XHTML stricht, it only works in MSIE 5.
OK, I did not try that, I used
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
and it works in Opera 7 and IE6
------
MH
On Tue, 23 Dec 2003 17:59:50 +0100, MH wrote: OK, I did not try that, I used <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> and it works in Opera 7 and IE6
Hmm, that's odd - if you put the
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d" in the DOCTYPE,
it b0rks on everything but MSIE 5...
I guess I can just forget about it working in NN4.
--
..
On Tue, 23 Dec 2003 10:03:21 -0500, Neal wrote: I've tried this, and I could never get it to work.
With more experimentation I have gotten it to work, provided the content
isn't inside an absolutely positioned div. I can have a 1x1 table
surrounding the lot. I can put as little or as much content inside and the
table will expand with the amount of content. However, if that content is
inside a position:absolu te div - even if 'position' is the only attribute
the div has - the table will not expand as the content grows.
--
..
Vigil <me@privacy.net > wrote in
news:pa******** *************** *****@privacy.n et: With more experimentation I have gotten it to work, provided the content isn't inside an absolutely positioned div. I can have a 1x1 table surrounding the lot. I can put as little or as much content inside and the table will expand with the amount of content. However, if that content is inside a position:absolu te div - even if 'position' is the only attribute the div has - the table will not expand as the content grows.
That's because absolutely positioned elements are taken out of the layout
flow, so they don't contribute any height or width to their containing
elements. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mudcat |
last post by:
Hello,
I would like to change the color of the default border around frames or
widgets. Note: not the highlight border, but the default border. There
have been many previous requests about the highlight border, but I
couldn't find anything on changing the default border color.
I know how to change the border relief and width but have found no way
to change the color of it. Is there a way to do that?
|
by: Michael Winter |
last post by:
I have the familiar 'thumbnail' scenario. I want to place a small
border around the image when the cursor hovers above it. I use a 1
pixel, solid border around the image that changes between normal and
hover.
This works fine in Internet Explorer, but in Opera 7.22, the bottom
border is 3 pixels thick. If I expand all borders to 3 pixels, this
bottom border is still 2 pixels thicker than the others, which
suggests that padding or a...
|
by: Frostillicus |
last post by:
I work with Interwoven TeamSite in an environment where I do not have access
to customise the default stylesheet, so the only option available to me is
to specify an additional stylesheet wherein I can add further
customisations.
My problem is that the master stylesheet, which I can not edit or remove,
includes a CSS selector for all input elements such that the border is thus:
border: 1px #cccccc solid;
|
by: Bob Bedford |
last post by:
I've an image in a cell of a table.
I've this CSS:
..dbtable{
width: 600px;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
border-collapse: collapse;
border: 1px solid #000000;
|
by: Bob Bedford |
last post by:
I've a table.
The table must not have any border.
The TR (every line) must have a border, but not the lines between cells.
The TR.pages must have no border.
so .mytable{border:0px;}
..mytable tr{border:1px solid #000000;}
..mytable th{border:0px;}
| |
by: Phill |
last post by:
I have a scrollable control I'm working on.
Some parts of the painting I want to always be in the same position
like my border. But when I hit the scroll bars my border moves. I
dont't understand why. Here's an example:
public class ListTable : System.Windows.Forms.ScrollableControl
{
public ListTable()
{
SetStyle(ControlStyles.ResizeRedraw, true);
|
by: tradmusic.com |
last post by:
Hi,
I'm new to CSS and, following some advice, created my page like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
by: UJ |
last post by:
I have a table with multiple cells and I want to draw a box around the
entire table but not around the individual cells. How do I do that?
TIA - Jeff.
|
by: alicanteman |
last post by:
Hi all,
I am currently working on a website and until recently everything was working fine on both IE 6, IE7 and Firefox V. 2.0.0.11
However, when i changed the footer heading to "Design by WebFactory365.com" text and colour at the bottom of the page, everything was fine in IE6 and IE7, but in FF i lost all my borders around the main menu nav bar, login page and e-shop. (It´s as if all the borders and tables that can be seen in IE6 have...
|
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...
|
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,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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...
|
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...
|
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...
|
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();...
|
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...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |