moving background image |
moving background image |
![]()
Post
#1
|
|
![]() Senior Member ![]() ![]() ![]() Group: Member Posts: 50 Joined: Aug 2005 Member No: 195,044 ![]() |
i recently posted a div layout to my myspace, but i wanted to add a picture as a banner. when i used this code:
<div style="position:absolute; top:-100; left:0%; width:967px; height:-0px; margin-left:-300px;"> <table border="0" width="967" cellpadding="0" cellspacing="0"> <tr> <td><img src="IMAGE URL" border="0" /></td> </tr> </table></div> to add the banner, it wouldnt show up. so then i tried adding a background, and this is the code that the div generator gave me: <style type="text/css"> .DivOverlayLayouts.com-div-generator{display:none} body { background:url('IMAGE URL HERE') no-repeat top center scroll; background-color:414D4D} but when i use that, the picture is too high up, it cuts into the myspace ad. so when i change it to "center center" in the code, it's too low. is there a code i can use to move it where i want? |
|
|
![]() |
![]()
Post
#2
|
|
![]() Kissing for yesterday. ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 465 Joined: Sep 2007 Member No: 569,813 ![]() |
did you use a DIV generator for this?
and at the moment myspace is being really funny with coding. so it could just be that glitch. but really you should create a new layer. call it .image and then place the image in the style tags which go into your i'd like to meet section. that way you can position it easier. all the <td> and codes which do this / > should not be there. ![]() |
|
|
![]()
Post
#3
|
|
![]() Senior Member ![]() ![]() ![]() Group: Member Posts: 50 Joined: Aug 2005 Member No: 195,044 ![]() |
yes, i did use a div generator. thanks
|
|
|
![]()
Post
#4
|
|
![]() Resource Center Tyrant ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 2,263 Joined: Nov 2007 Member No: 593,306 ![]() |
You don't need to add a new class for the banner. Just use absolute positioning. Play around with this altered code that you have:
CODE <style type="text/css">
.DivOverlayLayouts.com-div-generator{display:none} body { background:url('IMAGE URL HERE') no-repeat; position: absolute; top: 100px; margin-left:-400px; background-color:414D4D;} |
|
|
![]() ![]() |