The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

HTML background problem

View previous topic View next topic Go down

In progress HTML background problem

Post by angel_of_night on May 7th 2014, 2:55 pm

Hello,

I am trying to make a HTML page for my forum. I am trying to use the following code to make a background with an image:

Code:
<html>
<body background="test.jpg">
<h1>test</h1>
</body>
</html>

But for some reason, when I press "submit" the code just disappears, making the page without a background.
If I try to press "preview" it works fine though.
What am I doing wrong?

Thank you

angel_of_night
Forumember

Female Posts : 565
Reputation : 10
Language : portuguese

Back to top Go down

In progress Re: HTML background problem

Post by Pizza Boi on May 7th 2014, 3:19 pm

Hi Very Happy

Because in this portion:

Code:
body background="test.jpg">

The 'test.jpg' only works on your computer and not on the website itself. If you upload the picture and get its direct link, replace the 'test.jpg' with it and that should be fine.

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

In progress Re: HTML background problem

Post by angel_of_night on May 7th 2014, 3:27 pm

I am actually using this link for the background http://img831.imageshack.us/img831/7024/bgbod10.gif
Also tried imgur, the result is the same.

angel_of_night
Forumember

Female Posts : 565
Reputation : 10
Language : portuguese

Back to top Go down

In progress Re: HTML background problem

Post by Michael_vx on May 7th 2014, 3:46 pm

as i guess this code works fine with me like 100% for HTML of course

Code:
<style type="text/css">
    /* Michael_vx */
body
{
   background: url(http://yamiejung21.webs.com/photos/CC1/k46.jpg) repeat-y fixed center top;
   color: #000000;
   margin: 0px 0px 0px 0px;
   padding: 0px;
   }
    </style>
and it never disappears from the HTML page

Michael_vx
Forumember

Male Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

In progress Re: HTML background problem

Post by angel_of_night on May 7th 2014, 5:34 pm

Hmmm weird, I found out if I write it in WYSIWYG mode, the codes mess up, but if I do in HTML mode, they stay fine.
Uhg, now I will have to edit everything manually.
Thanks for the help.

angel_of_night
Forumember

Female Posts : 565
Reputation : 10
Language : portuguese

Back to top Go down

In progress Re: HTML background problem

Post by Ange Tuteur on May 8th 2014, 6:12 am

Hello,

The sceditor does not support the background attribute, use the style attribute instead.

Ex :
Code:
<body style="background:url('/myimg.gif')">elements</body>

The background attibute should be supported in advanced mode which I highly recommend for editing and creating HTML pages.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: HTML background problem

Post by Pizza Boi on May 8th 2014, 7:11 am

Hi Very Happy

Also, Ange, whenever we use font-family and color, it replicates it in the original post, messing it up. Is that a thing with FM or is it just our forum? (It happens when we use class tables).

Anyway, @OP, in case you also experience this problem (With any HTML related background thing), I would highly suggest just declaring a name for it and if you don't want to use the CSS, you can use something like:

Code:
<html>
<script type="text/CSS">
body.myclass {
 /* Style */
}
</script>
<body class="myclass">
/* Contents */
</body>
</html>

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

In progress Re: HTML background problem

Post by Ange Tuteur on May 8th 2014, 7:34 am

From what I recall with bbcodes, setting the color in the parent style attribute will cause the editor to enter color tags endlessly on its children until the property is removed.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: HTML background problem

Post by Pizza Boi on May 8th 2014, 7:42 am

Hi Very Happy

So technically, when using it, it's either we just use the default BBC code or have it in the CSS? What the fuck ?!?

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

In progress Re: HTML background problem

Post by Ange Tuteur on May 8th 2014, 7:45 am

If it is in your stylesheet it wont matter. When it is in an inline style of an element, that is when tags such as color or bold will constantly duplicate on the children elements.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: HTML background problem

Post by Pizza Boi on May 8th 2014, 7:48 am

Hi Very Happy

Okay, thanks so much Ange :rose: . I'll give my staff a heads-up about this one I love you .

@OP: Sorry for asking in your topic, lol.

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum