Hello all… I find my self here again asking for some help…
I have an image (1054 x 709). I need to place on the right side of the body. Now my wrapper is 960px wide. I need the image to always be centered on the right edge of the wrapper. (so that half the book is in the wrapper (or rather behind, you understand what i mean i hope)
The wrapper is centered (margin:auto)… and I can use the background image property to place the background image… but it moves as the windows size or resolution changes.
and tips or solutions will be paid handsomely with beer and feasts (sent via mail ofc)
dont know if this worked… but if you can see what I mean from the picture… I made the wrapper blue so you could see. The books should go on the body and stay divided between the wrapper and the right side… regardless of resolution and windows size
yip, that is exactly what I want to do… and it PAINS me I can’t figure it out (yet)… I did read the forum posts you linked… while I am grateful for your help, I’m either too tired or too stupid to see the relevance atm
If you want it to be semi see-through like in your image, you’ll need opacity on it as well :). It’s hard to tell what it’ll look like with the overlap. The wrapper will just need position:relative; and preferably a solid background color, like white, as you have in the image you attached :).
really annoys me this!.. I dont have time (got to go to work)… going to leae some markup and css for you guys to look at :(I need the top dark bar to be over the books)
What I would do is make the books a background image and place that on the <body> element. The trick is to make the background image very wide but mostly transparent. In Photoshop, make a wide file (say around 1880px wide) with a transparent background (or a background that matches your site background color). Place the book image into this so that the middle of the book is 470px to the right of the center of the file (that is, half the width of the wrapper). Save this image for the web, and place it as the background image on the body element:
body {background: #color url(/assets/images/book.jpg) no-repeat 50% 0;}
Too big for deployment on a website as a background. Ok… go on.
So the image is larger than the element being applied to, which can’t be done… ok…
Which one? Centered or right? There is no both!
Even with the code you posted (that looks a dozen times more complex than necessary) for the life of me I can’t figure out what it is you’re even asking for – though the size of the image in question ALONE means it’s something I would advise against even trying to put on a website in the first place. “Not viable for web deployment” – you might be best off leaving it at that… especially with all that ASP giving you over-complex/pointless/wasteful non-semantic markup. Inlined presentation, clearing DIV, endless wrapping div for christmas only knows what, spacer div’s likely doing padding or margin’s job, nonsensical use of heading tags… Ouch.
I got it working… (bg image ended up at about 80kb after further optimisations)… Totally agree about the markup… When I’m finished coding I’ll go back and revisit the markup. Thx for your interest in my post though.