0

This is what I want my outcome to look like http://teh-shepherd.webege.com/

Tried changing to css, but i cant get positioning done right

<div id="nofade" align="center">
<b>block 1</b>
</div>			
<div id="fade80">
</div>
<div id="nofade" align="center">
<b>block 2</b>
</div>			
<div id="fade40">
</div>
#nofade {
position:static;
background-color:transparent;
position:absolute;
z-index:3;
}

#fade40 {
position: absolute;
top: 50%;
left: 0;
padding: 10px; 
background-color:#000000;
opacity:0.4;
filter:alpha(opacity=40);
z-index:2;

}

#fade80 {
position: absolute;
top: 50%;
left: 0;
padding: 10px; 
Width:100%; height:20%;
background-color:#000000;
opacity:0.4;
filter:alpha(opacity=40);
z-index:2;
}

thats what i have, any input would be appreciated

Edited by NickRx: n/a

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Asiic
0

Let me guess, the vertical positioning is the hard part?

I would recommend using javascript. Here is a simple jquery plugin that should do it for you.

0

Nah I got the vertical position done with css, the part I'm having trouble with is placing the divs like tables to make a box, I'm new to using just divs and no tables

1

I am not entirely sure what you are asking for, but i'm assuming this code will help. Hope it works

CSS:

<style>
html, body { 
width: 100%;
height: 100%;
margin: 0;
padding: 0;
color: #ffffff;
background-image:url(http://g1-wallpapers.com/albums/userpics/10004/space-planets-snow.jpg);
	}
#container {
position: relative;
top: 20%;
margin: 0 auto;
width: 50%;
height: 100px;
	}
#fade40 {
width: 100%;
height: 80%;
background-color: #000000;
opacity:.4;
filter: alpha(opacity=40);
z-index:2;
	}
#fade80 {
width:100%; 
height:20%;
background-color:#000000;
opacity:.8;
filter: alpha(opacity=80);
z-index:2;
	}
</style>

HTML:

<body>
<div id="container">
	<div id="fade80">Header</div>	
	<div id="fade40">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ac orci lacus, et vestibulum massa. Sed rutrum elit erat. Nullam euismod imperdiet gravida. </div>
</div>
</body>
</html>
Votes + Comments
Exactaly what I needed :) Thanks man
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.