Results 1 to 9 of 9

Thread: object position problem with multiple objects

  1. #1
    Join Date
    Jul 2005
    Location
    UK
    Posts
    159
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default object position problem with multiple objects

    hi, i am working on a custom myspace page for a client.

    this bit of code allows me to control where the myspace music player goes:
    Code:
    object {
    		position: absolute;
    		top: 559px;
    		left: 50%;
    		margin-left: -39px;}
    but now every flash movie i try to add elsewhere, even if i give it a separate class with its own position, it gets repositioned by the above code.

    how do i fix this? thanks so much!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well - say the class="otherobject":

    Code:
    .otherobject {
    		position: static!important;
    		margin-left: auto!important;
    }
    That will position it in the normal flow of the page, so the top and left will be meaningless. The margin-left should negate the margin from the other rule. The !important keyword will override other values for the same property that might otherwise be inherited from another selector.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    moscarda (02-03-2009)

  4. #3
    Join Date
    Jul 2005
    Location
    UK
    Posts
    159
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    well the problem is that when someone posts a youtube video, for example, they arent given a chance to give it a class, i dont think, i was kind of hoping there would be a way to give just the music player absolute positioning, and all other objects would just show up where ever they are posted

  5. #4
    Join Date
    Jul 2005
    Location
    UK
    Posts
    159
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    hmm this is really strange, i tried doing what you said, it should work for the layout anyway, even if i cant control other users posting flash movies in the comments...

    now i'm able to add my objects without them being repositoned, but it somehow forced the myspace music player into a different spot, and in its place is a duplicate of one of the movies i gave the "otherobject" class to.

    my head hurts.

  6. #5
    Join Date
    Jul 2005
    Location
    UK
    Posts
    159
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    BTW/FYI:the music player is something that the page has built into it already, it is not within my editing capabilities to add a specific css class to it, the only way to alter it is thru the generic object css class.

  7. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If you can give me a link to the page, and a link to a similar page with the flash object that has no customization. I may be able to find you better style hooks with which to work for this.

    One thing though, are you absolutely sure that you are allowed by the mySpace terms of use to do this sort of customization?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. The Following User Says Thank You to jscheuer1 For This Useful Post:

    moscarda (02-04-2009)

  9. #7
    Join Date
    Jul 2005
    Location
    UK
    Posts
    159
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    yeah im positive, you can customize anything as long as it doesnt cover the advertisements.


    the page i'm working on is http://www.myspace.com/eatgiraffe

    and here's a regular myspace band page with no custom css:

    http://www.myspace.com/mybloodyvalentine

  10. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The style hooks appear to be (for the main player):

    Code:
    #profile_mp3Player object
    And for friends submitted flash:

    Code:
    td.columnsWidening object
    Also, be aware That I don't see any friend submitted flash on the page you are editing, though I may have missed it, there are a number of animated gif images though, these (and all friend submitted images) will be styled with:

    Code:
    td.columnsWidening img
    Since these should generally all be treated the same, use the compound selector:

    Code:
    td.columnsWidening object, td.columnsWidening img {
    rules go here
    }
    Now, as I'm not sure if your styles come before the mySpace default styles or not, if any of yours have even a chance of contradicting the defaults, they should be followed by the !important keyword, ex:

    Code:
    #profile_mp3Player object {
    position: absolute!important;
    left: 20px!important;
    top: 250px!important;
    }
    In fact, write them all like that, just to be on the safe side.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  11. The Following User Says Thank You to jscheuer1 For This Useful Post:

    moscarda (02-04-2009)

  12. #9
    Join Date
    Jul 2005
    Location
    UK
    Posts
    159
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    wow, this is the most helpful and informative post i've found on the subject, thank you so much! yeah, i had to delete all my flash movies as well as the friend submitted ones until i could find a work around, which i have now, thanks to you! keep on rockin in the free world.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •