I have looked at and tested the suggestions that you have made
and have decided on the following default HTML and CSS definitions
for my standard Page.
The attached files will give me the Notice area that I had originally
asked for in this forum.
The Notice will be the top 20px across the entire width of the
browser window.
When resized down, a scroll bar is added to the bottom that will
display the Notice for the entire defined width.
When the Page is opened by a browser on a display with a
greater resolution, I get the Notice at the entire browser width.
If the browser has scripting enabled I can make adjustments in
the function window.onload() to the #notice-default and #page-default
values contained in Application.css file to center my page at the
greater resolution.
If the browser does not has scripting enabled,
that’s all you get for 2 bucks.
boB the dyslexic programmer strikes again.
Thats Bob not boB.
<script = “text/javascript”>
window.onload = Init; // not Init()
function Init()
{
alert(document.body.clientWidth); // this works
alert(document.getElementById(‘page-default’).style.marginLeft); // this does not return a value
document.getElementById(‘page-default’).style.marginLeft = “200px”; // this works
alert(document.getElementById(‘page-default’).style.marginLeft); // this works
}
</script>
When you post a reply click the “go advanced” link at the bottom and you will get a bigger edit box and a load of tools across the top. One of the icons across the top will be the hash symbol (#) which will wrap “code tags” around the selected text.
Or you can just write it by hand using: [ code ] and [ /code ] (remove spaces inside brackets) to hold your html.
Paul,
Sorry to hijack this post, but I am curious as to why the position “fixed”( or position “absolute”) does not annihilate display:block in your ruleset. I was under the understanding that floating an element or giving it position:fixed or absolute immediately gave it display:block?
Where am I looking exactly I’m not sure I saw a display:block in there.
If an element is absolutely positioned then its display value is set according to a table of values.
If it’s display:value for example is inline (position:absolute; display:inline) the the inline will be computed as display:block.
If its display value is block then it remains block.
If it’s display:value is “table” then it remains as “table” but if its value were table-cell then it is reset to block (because you can’t absolutely position table-cells).
You can see the whole list of values in the sitepoint reference link above.
It may be that you have often seen display:block added to absolutely positioned elements and this was to cure a bug in legacy browsers I believe because they didn’t like inline elements being absolutely placed although I can’t remember which browser that was (probably opera).