Log In · Register

 
moving background image
strAngx
post Mar 23 2008, 01:03 PM
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?
 
 
Start new topic
Replies (1 - 3)
vintage-toile
post Mar 23 2008, 01:08 PM
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. rolleyes.gif
 
strAngx
post Mar 23 2008, 01:15 PM
Post #3


Senior Member
***

Group: Member
Posts: 50
Joined: Aug 2005
Member No: 195,044



yes, i did use a div generator. thanks
 
MissHygienic
post Mar 25 2008, 11:39 AM
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;}
 

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: