Tableless problem

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
powerPT
Forum Newbie
Posts: 14
Joined: Tue Apr 04, 2006 2:25 pm
Location: Portugal

Tableless problem

Post by powerPT »

Hi guys!

I have a problem, the solution may be easy but even reading some tutorials I don´t have the answer.

Imagine that tha layout is just two layers(<div>), one top and another in the bottom.


What is happens:
Image

Well, that text is under the bottom layer :roll: What I can add tho CSS to solve this?

Capiche? :D
Last edited by powerPT on Sat Apr 22, 2006 8:42 pm, edited 1 time in total.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

post your code.
powerPT
Forum Newbie
Posts: 14
Joined: Tue Apr 04, 2006 2:25 pm
Location: Portugal

Post by powerPT »

I think that only a part of CSS is necessary:

Code: Select all

div.main { /* Where main content is(the top layer) */
position:inherit;
	left:208px;
	top:233px;
	width:475px;
}

div.bottom { /* the bottom layer */
position:absolute;
	left:208px;
	top:488px;
	width:475px;
	height:36px;
	background-color: #5276B0;
}
Thanks in advance
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

powerPT wrote:I think that only a part of CSS is necessary
I think that only a part of the answer is necessary. Just change the
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

It looks like the problem is the fact that you've set the bottom class to have an absolute position. That means that come hell or high water, that div is going to be at 488 X 208 px, regardless of other content. Changing the position to 'relative' might change it, but we can't be sure without seeing all your code (though I can understand your reasoning for only showing some of it).
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply