Connecting Tech Pros Worldwide Help | Site Map

Position photo over banner

Newbie
 
Join Date: Aug 2009
Posts: 2
#1: Aug 26 '09
I have a wordpress blog that I want to get a particular look from .. I've seen it elsewhere, but I can't figure out how to do it (and can't locate where I saw it before)

Take a look at:
http://bethanylcs2.org/church/positionPicture.html

I'd like the picture to be covering the right side of the banner, going a bit above the blue gradient, with about 1/4" of it showing to the right of the picture.

I've tried enclosing an absolutely positioned entity with a containing div, but that doesn't seem to be working.

As the window is made thinner or wider, obviously the picture needs to stay with the underlying banner and not in the same position.

If I can get this look I'll move stuff on the sidebar down -- not a concern.

Any ideas? Here's what I presume is the pertinent CSS:

/* This makes the basic screen be 936 pixels wide */
#container {
margin:0 auto;
width:936px;
}
/* This puts up the banner (Bethany Lutheran Church and School) */
#header {
background:url(img/header.jpg) 0 0 no-repeat;
height:125px;
border-bottom:1px solid #A6A6A6;
overflow:hidden;
}
/* And this attempts to position the picture */
#header .banner {
position:absolute;
left:800px; top:-15px;
color:#999;
}
Newbie
 
Join Date: Aug 2009
Posts: 2
#2: Aug 26 '09

re: Position photo over banner


I've simplified this here -- everything in a single file:

http://bethanylcs2.org/church/testposition.html

I've put the image on twice -- once with absolute positioning, so as you change the width of the window the image moves in relation to the underlying text. The entire image shows though.

Secondly using inline positioning; the bottom of the image is cut off.
Reply

Tags
absolute, css, position