...

View Full Version : Getting text with background?



Cheeseboy
12-30-2006, 11:13 PM
Hi, i have the text:

<div id="foreat"><td><h3><p><b>What's the scoop on TV?</b></p></h3></td><td><p>Text goes here</td><br /><br /><td>TExt Goes here</td></div>

and the image i want for the background is called "middlepic.png"


Heres my css code:

#foreat
}
display: block;


position: relative;
width: 450px;
top:41px;
margin-left: -370px;
left: 50%;
font: 12px verdana;
text-align:left;
{



I was wondering if someone could fix this code for me so that the middlepic.png was on the background of the text. Also could you make it so the text and background move when the browser window changes size.

Thank you:thumbsup:

haveacigar
12-30-2006, 11:24 PM
You could try this



<style type="text/css">
body {
background:url("middlepic.png");
}
#foreat {
position:absolute;
width:450px;
top:41px;
left:50%;
font: 12px verdana;
text-align:left;
z-index:1;
}
</style>

<div id="foreat">


<h3>What's the scoop on SED TV?</h3>
<br />
Text goes here

</div>


If thats what you are looking for...

haveacigar
12-30-2006, 11:33 PM
sorry i meant to post this



<style type="text/css">
body {
background:url("middlepic.png");
}
#foreat {
position:absolute;
width:450px;
top:41px;
left:50%;
font: 20px verdana;
text-align:left;
z-index:1;
color:blue;
}
#maincontent
{
position:relative;
z-index:2;
}

</style>

<div id="foreat">


<h3>What's the scoop on SED TV?</h3>
<br />
Text goes here

</div>
<div id="maincontent">

</div>


and obviously put in the main content in main content...

didnt edit because the site wouldnt let me

Cheeseboy
01-01-2007, 02:32 AM
why does the text still move?

<style type="text/css">
body {




}
#foreat {
position:absolute;
width:360px;
top:249px;
left:36%;
font: 11px verdana;
text-align:left;
z-index:1;

}
#maincontent
{
position:relative;
z-index:-1;
}

</style>






</head>
<body style="text-align: center;">

<div id="foreat">


<td><h3><p><b>What's the scoop on SED TV?</b></p></h3></td>
<td><p>Text goes here</td>



</div>
<div id="maincontent">
<img src="titlepic1.png" alt="title"/>

<div id="masthead">
<a href="index.html"><img class="button"src="button1.png" alt="Button1"/></a>
<a href="sedtvs.html"><img class="button"src="button2.png" alt="Button2"/></a>
<a href="computers.html"><img src="button3.png" alt="Button3"/></a>
<a href="gifts.html"><img class="button"src="button4.png" alt="Button4"/></a>
<a href="travel.html"><img class="button"src="button5.png" alt="Button5"/></a>

<a href="finance.html"><img class=""src="button6.png" alt="Button6"/></a>
</div>
<img src="middlepic.png" alt="Click Here"/>


</div>

Thanks!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum