Help - Search - Members - Calendar
Full Version: DIV content
Forums > Resource Center > Support Center > MySpace Support > Myspace Resolved Topics
gtshawtie
okay .. im finished with all the graphics for my site now i need to know hot to add the text content.
the code i am using works but the text appears UNDER my backround .. does anyone know how to fix this??

heres the code.
CODE
<div id="LayerNameHere" style="position:absolute; width:100; height:150; z-index:0; left:10; top:20; background-color: D6D6D6; overflow: auto; border-color: 000000; border-style: dashed; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;">CONTENT</div>

huh.gif
Relentless
What do you mean by under. Do you mean by the background is on top of the text or the text is underneath the background.

If it's underneath the background, change the numbers; top. Put a - number to make it go up. Or a positive number to go down.
This Confession
CODE
<div class="bg" style="position: absolute; left:0px; top:0px; width:000px; height:000px; overflow: hidden;">

CONTENT

</div>


use that?
freeflow
You can't use divs like that.
I just typed this out for another topic it might help you


This is how you add text/content
QUOTE
You don't understand positioning?

Here read carefully.

Lets say I wanted a div to put stuff about me in . The first thing I would do is choose a name for the div. So I choose toya. (thats my name and I want that to be the name of my div). So the first thing I would do in about me would be
CODE
<style type="text/csS">
.toya{

I put the divname I chose and a . (you need the dot/period)

Next I would have to add the attributes of a div( these are for basic divs)
CODE
<style type="text/csS">
.toya{
position: absolute;
left:#px;
top:#px;
width: #px;
height:#px;
z-indeX:0;
}
</style>

{I added the closing </style> tag too just make sure you have it once you finish.}

Div Definitions

position: Leave it as absolute. It tells that your using absolute positioning.
left: Tells how many px left you will go. To go farther left put low numbers or negative numbers before the px. To go more right make the numbers higher.
top: Tells how many px you want to go up. The lower the higher. So if my number was 2px. Then it would be at the way top.
width: Self explanitory. Tells the width of the div.
height: Tells the height of the div. Self explanitory.
z-index: You don't need this but its a good feature. Basically just for each div change the number. Your first one would be 0 . Second would be 1. Third 2 . Fourth 3. And so on.


Now What you do is add diff numbers in top , left width and height till you are satisfied. (do not go by the myspace preview unless you put your divs in abou tme). Your numbers can be negatives and in the hungers (400, 500, 645, etc). Do this to all the parts where I put #.

Then once you get a position do
<div class="divname">
content
</div>

So for mine it would be
CODE
<div class="toya">
content
</div>

(without the dot)

I hope thats what you meant because I just typed all that out now _unsure.gif


Once you get your first div just use this as your basis for the rest:
CODE
.divname{
position: absolute;
left:#px;
top:#px;
width: #px;
height:#px;
z-indeX:0;
}
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.