HTML & CSS
Buongiorno from 1 degrees C snowy Wetherby UK..
On this page http://tutorial.davidclick.com/curvy.html & illustrated here http://i216.photobucket.com/albums/cc53/zymurgy_bucket/jinxed-sale-position_zps95f25ea0.jpg I'm trying to get this image http://i216.photobucket.com/albums/cc53/zymurgy_bucket/sale-logo_zps87f351ae.jpg to site vertically just outsode the wrapper left & right. But Ive encountered two obstacles:
- The sale image is getting chopped off by height of the header which i cant understand
- Whats the most efficient way of getting the Sale image to appear on the right handside aswell.
Zygoma, Try this and see if it works for you.
FYI: Indenting code is a helpful way to keep track of the structure as the page is being built. Better than obscure/misplaced comments.
Thread: Cant get background image to dispaly how i'd like :-(
http://i216.photobucket.com/albums/cc53/zymurgy_bucket/sale-logo_zps87f351ae.jpg ("sale" image)
<link rel="stylesheet" href="curvy.css" />
<p>"Turn Hazardous Workplace Corners Soft"</p>
<p>Featured on BBC's Dragons Den our easy to apply quick fix bumpers can tame any sharp corner soft</p>
Add the following to your css:
margin-left:-160px; /* sets distance of image from edge of #wrapper */
margin-right:-160px; /* sets distance of image from edge of #wrapper */
-ms-transform:rotate(180deg); /* IE 9 */
-moz-transform:rotate(180deg); /* Firefox */
-webkit-transform:rotate(180deg); /* Safari and Chrome */
-o-transform:rotate(180deg); /* Opera */
<font color='"#0000FF"'>margin:2px 0 0 -2px</font>; /* changed to compensate for border width */
You can change code CSS following
background-position: 150px 10px;
background-position: 150px 10px;
Hope will help you!
Ron has given you a good example of how to do it but I thought I'd clarify what is happening.
The image on the left is truncated because the content wrap is floated and thus the background of the parent will only extend as far as its non floated content. You need to apply some containing mechanism to #wrapper or indeed don't float the content-wrap as its not needed to float.
The overflow:hidden in the reply above would also clear the floats and allow the image to be seen but only as long as the element is over that section of the viewport where the fixed background is placed. A fixed positioned background is always placed in relation to the viewport and will only show in the element when the position of the element co-insides with the background-position the image resides in on the viewport. As Rons example shows you don't really and a fixed background position anyway unless you were attempting to keep those images visible while the page scrolls and then you'd need a different technique anyway.
Thank you guys that worked but i have a question please... http://tutorial.davidclick.com/curvy.html
How come both banners are successfully rotated 180 degrees when the CSS code only instructs ine .saleright image to re orientatate as the screen grab illustrates:
I can only see the right banner transformed?
Ive clearly had too many coffees today & cant see straight I'll look at this another day, thanks for taking a look
Damn yes i see this now, oops. Big thank you for all the help on this
This topic is now closed. New replies are no longer allowed.