...

View Full Version : Can I align right edge of image to 50%?



seagrape
11-08-2010, 07:21 PM
I have an image that resizes according to the size of your browser window, the left side of the image is lined up to center. I have been trying to get the RIGHT side to line up to center.

I have looked and looked for ways to do this here on the forum and elsewhere on the net.

Does anyone know what I need to change/add to make this possible.

You can see my test here: http://www.seagrapestudios.com/testingsites/

Thanks ahead of time!

/A

SB65
11-08-2010, 07:34 PM
img.bg {
float:right;
height:100%;
margin:0 50% 0 auto;
max-height:100%;
min-height:100%;
position:fixed;
right:0;
top:0;
width:auto;
}

Seems to do it.

DrDOS
11-08-2010, 07:44 PM
I have different code that does it, but exactly how are you going to use this div?
@charset "utf-8";
/* CSS Document */
body {
margin:0;
}
#singlewrap {
margin:0 auto;
border:1px solid #063;
height:100%;
display:block; }

#imagesingle {
margin:0 0 0 0;
border:1px solid #603;
left:-50%;
height:500px;
width:400px;}

#singlewrap img.bg {
/* Set rules to fill background */
min-height: 100%;
min-width: auto;
max-height:100%;

/* Set up proportionate scaling */
height: 100%;
width: auto;

/* Set up positioning */
position: fixed;
top: 0;
left: 0;
margin:0 auto;
float:left;
}
#menu-bottom { margin: 0 auto; height: 1000px; display:block; border:0px solid #000;
background-image:url(http://www.seagrapestudios.com/testingsites/liancarlo/Designs/menu-transparent.png);
background-repeat:no-repeat;
background-attachment:fixed;
background-position:bottom;
position:relative;
bottom:0px;
background-color:transparent;
z-index:30;}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum