473,756 Members | 2,117 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

overlapping layers relative to interior page content

I need to know how to overlap DIV content within 'relative' associated
rendering. I am building div layers in the middle of a page and when I set
positioning to absolute in the CSS, it references back to 0,0 on the entire
page. If I set it to relative, the div layers will not overlap as needed.
I prefer to avoid javascripting an 'innerHTML' re-write of a single div and
would instead like to build two layers that can reside at the same position
and be of the same size that I could 'turn on and off' as needed. The other
content 'up' and 'left' of this item may change over time and I prefer not
to have maintenance nightmares in the future should this happen, as this is
not the only page that may require such a solution on what is to be a large
and growing site.

Another thing I noticed is that if I set absolute, the 'table' I built with
a pretty CSS border to go around this content does not 'fill' to the proper
size without my 'pushing' it with transparent spacer images of the
appropriate size. Is there any way to overlap content within a container in
the middle of the page and/or what is the best way to do this? The
information to follow provides additional information on this particular
solution should anyone be interested....

Kathy Lynn

PREFACE:
I tend to prefer to code my pages as modularized as possible - in
otherwords, using various forms of server side includes to build regions of
the page independently. Most of the pages I develop use what one company I
worked for referred to as a 'hockey stick' approach using tables to build a
header area with navigation buttons/items along the bottom, and a left
margin with further buttons/items and finally a footer at the bottom with
other links, etc. This leaves a content area on the middle right of the page
taking up the majority of the browser display area. It is my preference
whenever possible to avoid framesets to achieve this.

STATUS:
So now I want to build one content peice [that is, a content container to be
independant of the top, left (and bottom) navigation 'bars']. I am building
this particular item to work like a tab-topped menu (rolodex style?) with
different tabs containing mixtures of either image content or dropped in
html and asp content. The items are not particularly complex or bulky and
as of yet I only have one 'html' based tab, the rest being images. The way
I had to do it thus far was to create a table for the 'html tab'.
The content area itself resides within a parent table (<TD></TD> element)
that divides the above mentioned 'sections' of the page. The 'rolodex'
style gui is another table with the 'tabs' in the first row and the 'html
tab' table {mentioned above} in the second. Simple layout stuff.
My current method takes the table and sets it visible or invisible based on
whether that 'tab' is selected, and uses either a transparent gif or one of
a selection of dynamically assigned gif files associated with the additional
tabs as the 'background' of the cell/TD holding the 'html tab' table. It
works great on screen - but will not print properly unless the user's
browser is configured to print background colors and images.
Jul 20 '05 #1
2 12039
"Catherine Lynn Wood" <kw***@accuemai l.com> wrote in
news:3f******** @news.splitrock .net:
I need to know how to overlap DIV content within 'relative' associated
rendering. I am building div layers in the middle of a page and when
I set positioning to absolute in the CSS, it references back to 0,0 on
the entire page. If I set it to relative, the div layers will not
overlap as needed. I prefer to avoid javascripting an 'innerHTML'


Common misunderstandin g of the difference between absolute and relative
positioning. Absolute positioning is actually relative to either a) the
entire viewport or b) the nearest containing block with a position set to
anything other than (the default) static. In both cases the positioned
element is taken out of the flow and repositioned.

Relative positioning, OTOH, always positions the element relative to the
position it would have had if it were statically positioned, and does *not*
take it out of the flow for layout purposes; the space it would have taken
if it were statically positioned will still be taken.

So if you need to position an element relative to a container element, you
have to give the container element a position: value (usually just
"relative" without specifying an offset) and then set position: absolute
for the element being positioned, with offsets relative to the edges of the
container.

Confusing, ain't it?
Jul 20 '05 #2

"Eric Bohlman" <eb******@earth link.net> wrote in message
news:Xn******** *************** ********@130.13 3.1.4...
"Catherine Lynn Wood" <kw***@accuemai l.com> wrote in
news:3f******** @news.splitrock .net:
I need to know how to overlap DIV content within 'relative' associated
rendering.
if you need to position an element relative to a container element, you
have to give the container element a position: value (usually just
"relative" without specifying an offset) and then set position: absolute
for the element being positioned, with offsets relative to the edges of the container.

Confusing, ain't it?


No - not actually - I was actually assuming it might be something like that
as I have gotten it to work before. But wasn't sure just what in my layout
caused it to 'work' in those instances. I would have likely arrived at that
conclusion eventually anyway but was more frustrated with the fact the
current attempt was not working as the previous one had. Thanks for the
information - I will give it a try.

But I still ponder the other question - if I add the 'relative' positioning
to the parent cell then use absolute for both the Table (HTML layout) filled
div and the Image (IMG tag) filled div, will the parent cell render to the
right height and width? Lemme go check before I click send here...

Nope - it didn't - but that was remedied with creating a 'div' instead to
take the 'relative' css and then fixing the width and height to the size I
needed. Granted the 'height' option is sticky sometimes, but it did appear
to work in this instance. I also had to make sure to include a left column
in my HTML to force the height as well or the table would not center
vertically. (just for the record)

Once again - thanks!

KL
Jul 20 '05 #3

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

Similar topics

1
2811
by: Lizzy | last post by:
I have an internet application which has a progress bar show whenever the customer is requesting data from the server. This progress bar is coded to work in both Netscape 4.75 and above and IE 5.0 and above. The progress bar code is written in javascript in an external js file (progressbar.js). The web screen is in a seperate jsp file (Registration.jsp). The problem I'm having is that the progress bar is not showing in Netscape 4.75 on a...
6
6845
by: David List | last post by:
I'm having a problem using different properties of the document object in the example javascripts in my textbook with browsers that identify themselves as using the Mozilla engine. One example of these problems is using document.layers. I have Google'd for examples of how to use the document object specifically with Mozilla, but I cannot find anything that explains why my problems occur. Could anyone here see through the included example...
3
25745
by: Peter Jenkins | last post by:
I have some divs I am using to get a two column layout for a section of a page, like so; <div1> <div2> <div3> blah blah blah blah blah blah blah blah blah blah blah blah </div> </div> </div>
2
3818
by: matthias tarasiewicz | last post by:
i have 2 problems with designing a rather big CSS driven site template: * how do i create absolute layers (DIV), that are positioned relative to each other? meaning: how can i create absolute positioned layers that would "grow" if the content grows, moving the other DIVs also? thanks, matthias
2
19748
by: Kalvin | last post by:
I am very new to CSS and am trying to set up 2 divs in the same space on the page. The idea is that div1 will be an informational message only displayed sometimes. When there isn't a message to be put there, then div1 will be hidden and div2 content will be visible. The problem I am having with this is that the content is still lining up right beneath each other. If I make div1 hidden, then there is just white space where it used to...
1
5581
by: Grimm | last post by:
I am developing an internalk inteface that integrates alot of seperate tools into one interface. The current version uses one Iframe inside a div layer for positioning. Currently the seperate web tools do not have the ability to stay active. As you switch from tool to tool the previous information is lost unless you use a Back button. I need to place multiple div layers with I frames in them that can be shown or hidden based on selection. The...
2
3206
by: Liam Gibbs | last post by:
Hello everyone. I'm having a problem with a web page. What I have is one DIV (a header) overlapping the border around another DIV (a menu block). I want this, because I want to put this header overtop the border of the menu. The problem is that the border is still showing through the text, giving it a strikethrough appearance. What I need is for the menu header to block that part of the border. An example is here:...
0
2847
by: richard12345 | last post by:
Hi Guys I have problem with site I am building. The sidebar with menu and other thinks is overlapping footer. The footer move with the content and but it dos it dos not move with the sidebar. Here is the website: holtz-realty And also the html file and css file. Anny help will by mostly appreciated. I did try everything I can think of. HTML:
2
2050
by: manugm1987 | last post by:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <style type="text/css"><!-- span.cls_002{font-family:Times,serif;font-size:12px;color:rgb(0,0,0);font-weight:normal;font-style:normal} div.cls_002{font-family:Times,serif;font-size:12px;color:rgb(0,0,0);font-weight:normal;font-style:normal} span.cls_004{font-family:Times,serif;font-size:11px;color:rgb(0,0,0);font-weight:normal;font-style:normal}
0
9287
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
10046
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, 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...
0
9886
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...
1
9857
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8723
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...
1
7259
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3817
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
2
3369
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.