HTML background problem
4 posters
Page 1 of 1
HTML background problem
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:
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
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
- Posts : 565
Reputation : 10
Language : portuguese
Re: HTML background problem
Hi
Because in this portion:
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
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
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: HTML background problem
I am actually using this link for the background https://2img.net/r/ihimizer/img831/7024/bgbod10.gif
Also tried imgur, the result is the same.
Also tried imgur, the result is the same.
angel_of_night- Forumember
- Posts : 565
Reputation : 10
Language : portuguese
Re: HTML background problem
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>
Michael_vx- Forumember
- Posts : 664
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: HTML background problem
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.
Uhg, now I will have to edit everything manually.
Thanks for the help.
angel_of_night- Forumember
- Posts : 565
Reputation : 10
Language : portuguese
Re: HTML background problem
Hello,
The sceditor does not support the background attribute, use the style attribute instead.
Ex :
The background attibute should be supported in advanced mode which I highly recommend for editing and creating HTML pages.
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.
Re: HTML background problem
Hi
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:
Regards,
Pizza Boi
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
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: HTML background problem
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.
Re: HTML background problem
Hi
So technically, when using it, it's either we just use the default BBC code or have it in the CSS?
Regards,
Pizza Boi
So technically, when using it, it's either we just use the default BBC code or have it in the CSS?
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: HTML background problem
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.
Re: HTML background problem
Hi
Okay, thanks so much Ange . I'll give my staff a heads-up about this one .
@OP: Sorry for asking in your topic, lol.
Regards,
Pizza Boi
Okay, thanks so much Ange . I'll give my staff a heads-up about this one .
@OP: Sorry for asking in your topic, lol.
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Similar topics
» Adding chatbox rules problem and background of announcements problem
» Can I add a background to a HTML?
» Html Background?
» help with HTML background
» Html Background music
» Can I add a background to a HTML?
» Html Background?
» help with HTML background
» Html Background music
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum