DIV Element Covering Another DIV Element |
DIV Element Covering Another DIV Element |
dsfcom |
Aug 9 2024, 11:01 AM
Post
#1
|
Group: Members Posts: 1 Joined: 9-August 24 Member No.: 29,220 |
Hello. I have an HTML/CSS page with several DIV elements. For the moment, I am concerned with the top, bottom, and main DIVs. Specifically, the fact that the navigation drop-down when clicked does not position the page as expected. For example, when "Computers" is clicked followed by "Research", the result does not show the research header, as if the space consumed by the top DIV is not accounted for. I am not sure where I am going wrong with this, and any help is appreciated. The file is attached. Thank you.
Attached File(s) Newb_Test.html ( 27.44k ) Number of downloads: 48 |
Christian J |
Aug 9 2024, 06:35 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,743 Joined: 10-August 06 Member No.: 7 |
as if the space consumed by the top DIV is not accounted for. That's normal for elements using "position: fixed", they are taken out of the normal flow. A workaround might be to add some compensating top padding to the currently targetted element, like: CODE :target {padding-top: 140px;} However, since you apply the target ID attributes to TR elements it won't work (TR can't have padding), but perhaps you could try something like this: CODE :target td {padding-top: 140px;} (I haven't tested this on your code sample). I should also add that the current layout wastes a lot of screen space, making the content area unnecessary limited. |
Lo-Fi Version | Time is now: 2nd December 2024 - 09:28 PM |