Log in

View Full Version : DIV code help :/



ModernRevolutions
07-16-2008, 07:55 PM
Ok the div code im talking about is myspace. I want to move the music player to the big blue bar in this layout: http://www.myspace.com/mr_layouts. I know how to move the music player its just that when i move it it goes under the div picture. Do i have to overflow or something? If so then how do i do it? here is the code im using to move the music player:
<style>embed,object {position:absolute;top:150px;left:500px;}</style>

However that is not the code right now. Because since i could put the music player there cuz i dont know how i put it in the top left corner and shrunk it. Help please :)

ModernRevolutions
07-17-2008, 12:30 AM
anyone? lol pleaseeee

jscheuer1
07-17-2008, 01:45 AM
If positioning something makes it go under something else, generally you need to set its z-index higher, ex:


<style type="text/css">
embed, object {
position:absolute;
top:150px;
left:500px;
z-index:10000;
}
</style>


I just used 10000 as a sort of overkill because I don't know what if any other z-index values are in use on the page. 1 would probably be fine as long as the z-index is the issue and the other item you want to cover has no z-index set for it.

There could be some other problem(s). The z-index is just the most likely reason for what you describe.

ModernRevolutions
07-17-2008, 01:52 AM
its not working :( everytime i do it then save the changes myspace changes it from z-index1000; to .. :/ is there any other code?

jscheuer1
07-17-2008, 02:19 AM
its not working :( everytime i do it then save the changes myspace changes it from z-index1000; to .. :/ is there any other code?

If you mean literally:


z-index1000

you left out the colon - it should be:


z-index:1000;

But it is possible that MySpace doesn't allow this sort of thing, in fact it may be a part of their terms of service that you cannot change the z-index on that item. If so, you are stuck with it where it is, or at least since you apparently can move it around, you will just have to find someplace else to put it where it will not get covered.

Now, if an item is absolutely positioned and is the last item in the source code, even if it appears higher up on the page, it will usually cover other things. So if you could move it to the end of the source code, that might do it, as long as the thing that was covering it doesn't have a z-index set for it.

TheJoshMan
07-20-2008, 05:20 AM
But it is possible that MySpace doesn't allow this sort of thing, in fact it may be a part of their terms of service that you cannot change the z-index on that item.

It is part of the T.O.S. on MySpace. They don't allow the "z-index" so people cannot cover up the ads at the top of everyone's profiles.