TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 103
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 132
  • Total: 132

Background image in an Article?

Started by americangothic, March 07, 2009, 04:55:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

americangothic

Greets.
I have a front page article I want to put a background image into so the text will float on top of it. Problem is every time I try to add the code in the HTML editor it just erases it on save.
Is there any way to get it to stay in there and show up properly?

Thanks gang.

Here's what I was using:

<BODY BACKGROUND="image.jpg" BGCOLOR="#FFFFFF" TEXT="#000000">


I also tried this:

<div style="background-image:url(/pix/smile.gif);
  background-repeat:repeat;
  width:200px;
  height:200px;">
</div>


G6Cad


IchBin

Due to a bug in the editor you'll need to use a work around to save the code. When you save your code change the block to a phpbox block. After you have then saved the code switch the block back to a HTML block. This will save the code properly until you edit it again.


Dianna

Ewww, thanks Ichbin, I was having that same issue. Cool!  :-)

americangothic

#5
Can you think of any reason why the bg image shows up in the editor but not in the article on the front page?

I am saving the article as a PHP page, then pasting my code in, then saving it as an HTML page which (in the editor only) appears to work. But again, as soon as I hit the Home button the image isn't there.


<html>
<head>
<title>Welcome to collectiveconspiracy.com</title>
<style type="text/css">
body {background-image: url(http://clancc.epconline.net/tp-images/bigc2.png); background-repeat: no-repeat; background-position: center; padding: 2px }
</style>
</head>
<body>
<center>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><strong>Collective Conspiracy</strong> was established in 1998 and is an invite only clan based in the USA, but consists of American, Canadian, British, and Australian members.<br /><br />We aim to provide a positive and friendly gaming environment for all on our public server.<br /><br />SERVERS:<br />Battlefield 1942:<br />
<strong>68.90.68.27:14567</strong><br /><br />TeamSpeak Server:<br /><strong>newyork01.voipservers.net:8772 </strong>
</center>
</body>
</html>

JPDeni

I would suggest that you use a div tag with the background image, rather than the body tag. I don't know for sure that it'll work, but it might. Things can get confused when there are multiple body tags on a page.

americangothic

Text won't float over a div tag bg image though.

JPDeni

Ah. That was the only thing I could think of, so I'm afraid I'm no more help. :)

americangothic

This is kind of a huge bug... I mean, no background images?

This website is proudly hosted on Crocweb Cloud Website Hosting.