Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Fhe
    Fhe is offline
    New to the CF scene
    Join Date
    Jul 2007
    Location
    England
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Help on creating a simple <Div> please?

    Hi, I am trying to code my own myspace layout useing CSS/HTML the link is here.
    http://www.myspace.com/fhe92
    I need to create a new DIV with a transparent background. See the image i have added for more information.

    http://i50.photobucket.com/albums/f301/w3sa/Help.jpg

    Im not sure the size the div will need to be.. i think about 150px width and about 300 height im not sure. Can some one please help me create this div? i dont undertand them.

    So far i have this.

    .aboutme{width:150;height:300;top:0;left:50px;position:absolute}
    Im not sure about the leftpx ? is that how far its from the VERY left of the web browser or what?

    Thanks

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,706
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    Quote Originally Posted by Fhe View Post
    […] is that how far its from the VERY left of the web browser or what?
    Not particularly. The offsets of absolutely positioned elements are determined by the next relative, fixed or absolutely positioned parent element. So if you have a div that’s positioned relative and 10px from the left, another element within that div that is positioned absolute and 10px from the left will be 20px from the left of the viewport.
    You have to give any parent element (probably the best would be the main container) position: relative; to have best control over how the absolutely positioned element will be positioned.

    Apart from that I’ll have to say that Myspace sucks (when it comes to modifying the code) and I’m not gonna waste my afternoon to look into your code and search for the correct element. Maybe someone else has the time and patience to do that.


  •  

    Posting Permissions

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