Position Absolute when resizing window overlaps

magali
avatar
rank newbie

newbie


Posts: 5
Joined: 2008-07-24

Hello!!

My 1st post here, hope you understand my question. Smiling

#1 - I've two tabs: "Web" and "Illustration".
#2 - When you enter the site the Web Information is show,so Web tab is active.
#3 - I used two divs, Web is display, Illustration is hidden, only display when clicking in tab Illustration.

Here is the CSS:

#contentweb {
	width: 710px;
	height: 170px;
	background: url("webdesignimg/ilustrasquare.gif") repeat;
	padding: 15px;
	text-align:left;
	position:absolute;
	top: 137px;
	left: 134px;
	}
	
#contentilustra {
	width: 710px;
	height: 170px;
	background: url("webdesignimg/ilustrasquare.gif") repeat;
	padding: 15px;
	text-align:left;
	position:absolute;
	top: 137px; 
	left: 134px;
	}

.tab a {
	width: 136px;
	height:25px;
	margin-right: 10px;
	margin-top: 10px;
	padding: 5px;
	color:#ffffff;
	text-decoration:none;
	background: url("webdesignimg/ilustrasquare.gif") repeat;
	float:left;
	}

So, what's the problem?

When I resized the window, the divs are overlapping Sad

Do you need the HTML code?
Thank you for any help!! Eye-wink

JackyBoy
JackyBoy's picture
rank Enthusiast

Enthusiast


Posts: 69
Joined: 2007-01-20
Location: Dallas Texas USA

Send a link to your page, if

Send a link to your page, if possible...
if not, send the html code. Most here would want to see something. You get better response in any support forum when you are specific and make it as easy as possible on the respondent. Smiling

Jack A

magali
magali's picture
rank newbie

newbie


Posts: 5
Joined: 2008-07-24

The example is here : )

Hi!!
Example here

Thanks!

Ed Seedhouse
Ed Seedhouse's picture
rank Guru

Guru


Posts: 2368
Joined: 2005-12-14
Location: Victoria British Columbia

Things are behaving just as

Things are behaving just as I would expect if you are using AP for that layout. AP is not necessary, and should be avoided for simple, layouts like that.

Absolutely positioned elements are taken out of the normal flow and are supposed to "ignore" the behaviour of all other elements. Stick with the natural flow of elements as much as possible and avoid AP except for special effects, and you better understand how they work fully before you do even that.

I could change my plea to guilty,
but I don't think it would stick.

Ed Seedhouse

magali
magali's picture
rank newbie

newbie


Posts: 5
Joined: 2008-07-24

I duplicate a post :/

Ups... //

magali
magali's picture
rank newbie

newbie


Posts: 5
Joined: 2008-07-24

Hello Ed, thanks for the

Hello Ed, thanks for the reply.

I've change the CSS for this:

#contentweb {
	width: 710px;
	height: 170px;
	background: url("webdesignimg/ilustrasquare.gif") repeat;
	padding: 15px;
	text-align:left;
	}
	
#contentilustra {
	width: 710px;
	height: 170px;
	background: url("webdesignimg/ilustrasquare.gif") repeat;
	padding: 15px;
	text-align:left;
	}

I understand what is happening I just don't know how to put the same divs at the same position. One above the other.

Example

Thanks!!

Ed Seedhouse
Ed Seedhouse's picture
rank Guru

Guru


Posts: 2368
Joined: 2005-12-14
Location: Victoria British Columbia

I thik you should just code

I think you should just code up your content semantically and with valid html, then worry about positioning and styling later.

Right now your doctype is malformed, so technically your page isn't even actually xhtml even though it may look like it. So browsers can do pretty well anything they like with it without violating any standard. You must learn to write valid xhtml or (preferably) html if you want CSS to work.

I'm really not the guy to help you code to a predesigned layout since I'm pretty much dead set against that whole approach and think it makes lousy web pages.

You should always use a STRICT doctype for a new page.

I could change my plea to guilty,
but I don't think it would stick.

Ed Seedhouse

magali
magali's picture
rank newbie

newbie


Posts: 5
Joined: 2008-07-24

Yeah Ed, you're right//

Yeah Ed, you're right//