Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to prevent 2 division panels from overlapping.

Posted on 2014-11-20
6
79 Views
Last Modified: 2014-11-20
Hi,

I would like to draw a bar on my website. I use divisions. But my bar has to be split in 2. So I geuss I need to division-panels.
One alignted on the right with the size 400. And the left division panel has the width 100%. But the left panel is overlapsing the right panel. How can I prevent this? Greetings, Peter Kiers
0
Comment
Question by:peterkiers
  • 4
  • 2
6 Comments
 
LVL 1

Author Comment

by:peterkiers
ID: 40455351
Or am i doing it wrong I just need a top bar devided in 2.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 40455495
Without a link to the page or the rendered code I can not even guess what is wrong other then the general comment that the dimensions or positioning must be wrong.

Cd&
0
 
LVL 1

Author Comment

by:peterkiers
ID: 40455507
Oke sorry here it comes.:

#page {
	position:absolute;
	left:0px;
	top:0px;
	width:100%;
	height:100%;
	z-index:1;
}
#imagearea {
	position:absolute;
	right:0px;
	top:0px;
	width:400px;
	height:100px;
	z-index:2;
	background-image: url(picts/home.jpg);
	background-color: #2555A2;
	border-left: #173769;
}
#logoarea {
	position:absolute;
	left:0px;
	top:0px;
	width:100%;
	height:100px;
	z-index:2;
	background-color: #2555A2;
}
</style>
</head>

<body>
<div id="page"></div>
<div id="imagearea"></div>
<div id="logoarea">
  <script type="text/javascript" src="java/header.js"></script>
</div>
</body>
</html>

Open in new window


Peter
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Author Comment

by:peterkiers
ID: 40455673
someone!
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 40456006
They overlap because the CSS declares the overlap.  There is no positionin attribute on the body so they default to top:0;left:0;

Two of them have the same z-index so the overlap based on listing order.  The CSS does not make any sense for the structure and what you say you are trying to do.

What is it you think it should look like?

Cd&
0
 
LVL 1

Author Comment

by:peterkiers
ID: 40456139
Thank voor the information. Peter
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to Left-Align Navigation bar? 4 34
div to fit another div 8 28
jQuery slideToggle one div at a time instead of all independently 33 76
Why a span is lower 2 26
This article discusses four methods for overlaying images in a container on a web page
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question