View Full Version : Help on creating a simple <Div> please?

07-26-2007, 05:54 PM
Hi, I am trying to code my own myspace layout useing CSS/HTML the link is here.
I need to create a new DIV with a transparent background. See the image i have added for more information.


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.

Im not sure about the leftpx ? is that how far its from the VERY left of the web browser or what?


07-26-2007, 06:57 PM
[Ö] 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.