473,774 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

two DIVs with same class: positioning

I have two DIVs with the same class in the same document. The CSS has the
DIVs absolutely positioned, albeit with a percentage (bottom: 0%).
Shouldn't the DIVs be in the exact same location instead of one above the
other, since they're using the same class and hence the same position?

-- Richard
Jul 20 '05 #1
3 2931
Richard Barnet wrote:
I have two DIVs with the same class in the same document. The CSS has the
DIVs absolutely positioned, albeit with a percentage (bottom: 0%).
Shouldn't the DIVs be in the exact same location instead of one above the
other, since they're using the same class and hence the same position?


It'd help to see the relevant CSS markup, instead of you just describing
what's going on.

Is there a URL it's uploaded to?

Regards,
Geoff

--
http://68.145.145.156:8080/
http://www.allmyfaqs.com/faq.pl?Geoff_Ball
http://www.allmyfaqs.com/faq.pl?Web_Core_References
http://www.allmyfaqs.com/faq.pl?How_to_post
Jul 20 '05 #2
"Richard Barnet" <rb*****@csaNOS PAMreno.org> wrote:
I have two DIVs with the same class in the same document. The CSS has the
DIVs absolutely positioned, albeit with a percentage (bottom: 0%).
Shouldn't the DIVs be in the exact same location instead of one above the
other, since they're using the same class and hence the same position?


Depends.
Do they have the same parent element?
Do their parent elements have position: relative; set?
What browsers have you tested with?
What's the URI?

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
Jul 20 '05 #3
In article <be**********@n nrp.atgi.net>, rb*****@csaNOSP AMreno.org
says...
"Steve Pugh" <st***@pugh.net > wrote in message
news:o7******** *************** *********@4ax.c om...
"Richard Barnet" <rb*****@csaNOS PAMreno.org> wrote:
I have two DIVs with the same class in the same document. The CSS has theDIVs absolutely positioned, albeit with a percentage (bottom: 0%).
.... What's the URI?


Isn't one yet. I've since changed the code all around, but in theory (or
for when this comes up again - I'm sure it will), shouldn't two absolutely
positioned child divs in the same parent div with the same class appear in
the same spot (one covering up the other)?


Yep. IE6 supports this, at least in simple cases, don't know about older
browsers.
Jul 20 '05 #4

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

Similar topics

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>
5
5008
by: Duane Lambe | last post by:
On some suggestions from this group, I've started to turn my internal helpdesky site for our company to non-absolute positioning. I've been reading O'Reilly's CSS book, and several web sites and tips. For the most part, things are going OK, but I can't seem to find an answer to a particular problem. Using a simpler example, below's some stuff...what I'm trying to do, is get the DIVs inside the .mainbody DIV to be 100% of their parent's...
2
3047
by: Egon Pasztor | last post by:
Hi. I'm new at CSS, so maybe this is obvious, but I've looked around quite a bit looking for a solution. I'm playing with the vertical positioning of elements in a 2-column layout. The prototype "scaffolding" page I'm playing with is here: http://www.eecs.berkeley.edu/~pasztor/test.html It looks right in "Mozilla Firefox", but not in IE 6. In IE 6, the three "nav" blocks are rendered right after one another in a vertical column.
20
3056
by: Tyler Carver | last post by:
I would like to do something that seems so basic with two div's but I don't think it can be done. Tables can do it in a snap. I was convinced that css was the way to go for layout but without being able to do even the easiest things, I don't see how. Here is the table way to do the layout (I want this to work in compliance mode in all modern browsers.): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"...
2
5488
by: David Winter | last post by:
This is a totally trivial CSS problem, I'm sure, but I don't get it. I want a centered DIV with a fixed width between two other DIVs that should fill the rest of the window/viewport (= 100%). How do I achieve this? I tried width:auto for the buffer DIVs, but it didn't work. This should at least work in IE 5.5 and Opera. A totally standards-compliant solution would be appreciated, of course ... :/ This is waht I have:
12
6307
by: deko | last post by:
Is there any way to work around the blank space created by hidden divs? I'm trying to use a relatively postioned divs with show/hide behaviors to annotate an image. The divs show/hide onMouseOver/onMouseOut but leave a blank space on the page when hidden (the space where the divs would normally be). Is it possible to use z-indexing to put regular content where the hidden divs would be? When I try to do this, the layers don't unhide as...
3
4672
by: Oddball | last post by:
I have a problem with the positioning of two divisions. They are containined within a content division in which all the page content happens (ie not the menus, etc.). The behavior I would like (and the behavior that happens in IE) is for the content division (from now on 'ConDiv') to resize with the content of either of the sub divisions (MainDiv and NewsDiv). I am trying to get the divisions to position directly next to each other. ...
6
1516
by: =?Utf-8?B?Tkg=?= | last post by:
Hi, What do you recommend for defining the layout of an asp.net 2.0 page? Leaving masterpages and user controls aside for the moment is the use of tables or Divs the best approach? I have been using tables so far to define the layout and use % based sizes so things stretch or shrink to fit the screen size. It works fine. I read about using DIVs and saw this approach being used in some MS Asp.net
3
2045
jhardman
by: jhardman | last post by:
I'm almost to the point of using tables to position my elements. That is how bad this is. So here's the rundown. I have an old page (created by someone else) that I was trying to update to reasonable standards. It has a header bar across the top and a footer bar across the bottom. The rest of the page is divided into two columns, a side bar on the left with info about the international organization, and the rest is info about the local...
0
10267
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
10106
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
9914
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...
1
7463
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
6717
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
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
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
3611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
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.