1
svaha
Background image/colour defined by html file?
  • 2004/1/1 3:31

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


I have many html files that I want to wrap in XOOPS with CJaycontent. I noticed that the background image never displayed nor the background colour.
What is the best method to let the html file determine background image/colour?

Should I change the style.css file and include my own class, or change the theme.html with a conditional test like : if mod name is CJaycontent don't include the style.css, or ....?

Thanks

2
Stewdio
Re: Background image/colour defined by html file?
  • 2004/1/1 3:42

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


I use straight html without .css or <style> tags. This allows the output to use the .css for that particular theme. Your background image should be reletive to the cjay content folder, so you may need to edit that in your files that you are trying to include in your XOOPS wrapper.

I'm not sure if thats what your looking for, but hope it helps a bit.

3
CBlue
Re: Background image/colour defined by html file?

I use tables for my html content in cjaycontent. That way I can define the background for my article/page that way. You can add bgcolor or background images that way. This works for me anyway.

4
svaha
Re: Background image/colour defined by html file?
  • 2004/1/1 11:04

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


Thanks CBlue and Stewdio
Let me explain a little more :
For instance beauty.html has this properties inside the html file
Quote:
<body bgcolor="#FFFFFF" background="journey_bg.jpg">

*note this is from my hard disk, on my site I changed path names.

No when I look with CJay I see : This
When I look at the plain html file I see : This

I have many files like for instance : This and That
All with different background colours.
I use the Zaja themes and there is a style.css included :
Quote:
<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_url}>/xoops.css" />
<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_themecss}>" />


In the Zaja style.css there is this :Quote:
body
{
color: black;
background: #97B7AF;
font-family: Verdana,Arial;
margin: 0px;


So this overrules the settings of my html files.

Now I want to change this, but I'm looking for the best method (also looking into the future)
Is this method checking the module/name/path and include a style.css file OR not, or something else....


Aloha

5
robekras
Re: Background image/colour defined by html file?
  • 2004/1/1 11:22

  • robekras

  • Documentation Writer

  • Posts: 187

  • Since: 2002/12/10


Aloha Svaha

I think here is the answer for your question:

https://xoops.org/modules/newbb/viewtopic.php?topic_id=13464&forum=1#forumpost54001
and here:
https://xoops.org/modules/newbb/viewtopic.php?topic_id=14077&forum=20#forumpost56662

According this you should write something like the following within your beauty.html

<body style="color: #FFFFFF; background-image:url(journey_bg.jpg)">


The stylesheet settings have always precedence over the HTML
tag attributes.


6
CBlue
Re: Background image/colour defined by html file?

Svaha, as I said above, I take out the body attributes from my html pages and just have <body>, then I put <table bgcolor="#ffffff" or background="someimage.jpg"> under the body tag. That makes the whole html page whatever I want it.

7
svaha
Re: Background image/colour defined by html file?
  • 2004/1/1 20:28

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


Hi all, thank you for the answers, CBlue I did not try that one with the table yet, but I'll do that also.

I tried answer of Robekras : <body style = "color" and so on and got what I asked for, but it is not what I wanted. You can see it for a while here but that is not what I wanted
So after crushing some old furniture I went on with my trial/error non systematic approach.
I 'found' Quote:
<div style = background-image:url("path/name of image")>
that worked for me, you can see it here for a while.
Now that's what I want.
As said, I will try your answer also CBlue.

This covers for me a solution for the style of individual files, the question for a solution for a module remains. I've read somewhere on this site an answer Skalpa gave (as far as I can remember) on the implementation of a common(don't know if this is good English) method for modules and style related things.
I think it's important to make this nice and clean, so you can find afterwards easily things you want to change.
It is also a speed issue, I think. A css file smaller then 1k? loads faster, this maybe a small issue, but all counts.

Aloha

8
robekras
Re: Background image/colour defined by html file?
  • 2004/1/1 20:55

  • robekras

  • Documentation Writer

  • Posts: 187

  • Since: 2002/12/10


Hope I do understand you correctly.

If you want to have an additional stylesheet file for a module you could add the following line to the module's mainfile (in general index.php):
$xoopsTpl->assign ('xoops_module_header''<link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/modules/rwk/theme/default/style.css" />');

Of course you have to change the path to the style.css (it's just a cut and paste from one of my files)

As far as I know (and remember) for the next version of XOOPS there is a new (and better) way to include something into the HTML head.

9
svaha
Re: Background image/colour defined by html file?
  • 2004/1/1 21:03

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


Quote:
Hope I do understand you correctly

Yes, that's what I meant. Thanks.

By the way is your avatar a 'hop' plant?
Aloha

10
robekras
Re: Background image/colour defined by html file?
  • 2004/1/1 21:26

  • robekras

  • Documentation Writer

  • Posts: 187

  • Since: 2002/12/10


Just look up the word hop.

If it is correct you mean the plant we need for brewing beer.
Although I live in Bavaria, near the largest hop cultivation area of the world...
I try to do in the art of Bonsai,
and this is just a small chest nut (Aesculus hippocastanum). Which has of course also something to do with beer.
I don't know if you know Bavaria, but we have many beer gardens (German: Biergarten) here, and this Biergarten is a very popular place in summer. We sit under a, in this case, large chest nut tree and drink a cold fresh Maß (1 litre in a mug) of beer and feel good , and maybe drink one more and more and more

Prost, skol, salute, cheers




Login

Who's Online

130 user(s) are online (95 user(s) are browsing Support Forums)


Members: 0


Guests: 130


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits