Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Body background and table background images

Quote Reply
Body background and table background images
http://www.greaterhamiltonarea.com/links_pages
In an effort to make the pages look like the rest of the site. I have successfully added headers and footers. They show up, but I'm having a problem with the text in the header (inside a table). Also, the table is supposed to be using a graphic as a background, but it does not show up at all in NN(4.61).
It shows up only around the border of the table in MIE.
I have used complete URL links to the image.
I have read about changing the dtd to; $dtd = '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"'; I did this on all the templates, and in the site_html.pl and site_html_templates.pl files where I thought it shoud go.

see at http://greaterhamiltonarea.com/headerexamplewithouthtml.html in NN to see how the background and table are supposed to look.
Thank you in advance, this is really all I need to do now in order to get this script running.
Quote Reply
Re: Body background and table background images In reply to
Oops...I did look at the second file and saw that it does appear in Netscape 4.5.

Use the complete URL for the image background tag, rather than images/image.gif, use /images/image.gif or http://www.yourdomain.com/images/image.gif in your header.txt file.

You do know that Netscape versions lower than 4.0 will not be able to see the Background image, right?

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. Smile
----------------------









[This message has been edited by Eliot (edited January 23, 2000).]

[This message has been edited by Eliot (edited January 23, 2000).]

[This message has been edited by Eliot (edited January 23, 2000).]
Quote Reply
Re: Body background and table background images In reply to
Oh Hi Eliot, I really do appreciate your efforts!
I understand that the result is different in the 2 browsers.
We work around this regularly.
Pleas view example; http://greaterhamiltonarea.com/headerexamplewithouthtml.html
To see how it should look. The image does show up just the way we like it in both, (although different).
I'm puzzled as to why it doesn't show up either way (when the same html code is used from the header.txt file) -viewed at: http://greaterhamiltonarea.com/links_pages/
this is where the links pages are.(Even the text size isn't quite right).


AND possibly related to this somehow, is how I am trying to edit the body tags for the templates. I have been reading the resources, and just haven't been able to get it!
Point me to a clear explanation of seting up the body tags for the templates would be great! Is it that I should just edit the body tag for each of the templates separately?
I'm just about to try to edit -site_html.pl
in the 'body' area, I thought I had done this. Thanx again

No I didn't actually realize that versions that new would not see the background of the table. Well once I get the links up and running, I'll go back and do a proper graphic for that table.




[This message has been edited by RipandRev (edited January 23, 2000).]
Quote Reply
Re: Body background and table background images In reply to
I did look at the file....

For the background attribute: use the complete virtual path with starting slash as I indicated!

Like the following:

Code:
<table BORDER=7 CELLSPACING=6 CELLPADDING=6 COLS=1 WIDTH="80%" BACKGROUND="/images/greymarblbg.jpg" NOSAVE >

Also, take out the NOSAVE..That only works in Internet Explorer. Same thing in the <body background...>.

Also, you SHOULD not include the <body> tag in your header.txt file. The header.txt codes should only include your table banner codes.

The reason that it does not show up in the header.txt is because that file is located in your cgi-bin directory and if you keep the images/image.gif, then it will look for the image in the following directory:

Code:
cgi-bin/links/templates/images/

And you do not have the image there. You have it in:

Code:
ROOT/images/

Also, the reason that the text is not coming out the same is that you are using an UNCOMMON font face style. One recommendation I have is that you make the GreaterHamiltonAreaglobecom into a graphic, so that it will consistently on all browsers.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------







Quote Reply
Re: Body background and table background images In reply to
Well your quick, you know i just threw that body tag in(the header.txt) at the last moment, in an effort to get anything to work.
I have taken it out.

I have done what you say..
I adjusted the image link in the table (header.txt) to look for virtual path.
Still wont show up.

I know it is an unfamiliar font, but it does show up fine in the examples which are not part of the (Links works).
I'm going to move the header and footers out of the cgi-bin and adjust all the links accordingly, and see if that helps.

I also have a background colour indicated. It doesn't show up, because of the white background image which is set up. But it does show around the frame of the table in the example page,
http://greaterhamiltonarea.com/headerexample.htm (-NN only, not MIE).
and I would hope it will show up on the (Links works) also. Its a light bluish/green.
(making a graphic soon)

Its funny I found this script very easy to work with and configure, soooo wierd that I get all jammed up over the headers, footers, and background.

Thanx!!
I'll let you know if moving the files and adjusting the links helps, I just don't know of anything else.

One more thing:
in the db_utils.pl,
should this be set to 0 or 1 ?
# Print out the headers if they haven't already been printed.
#
if (!$html_headers_printed) {
print "HTTP/1.0 200 OK\n" if ($db_iis or $nph);
print "Pragma: no-cache\n" if ($db_nocache);
print "Content-type: text/html\n\n";
$html_headers_printed = 1;
}
}

thanx
Quote Reply
Re: Body background and table background images In reply to
Listen try using the full virtual URL!

Like the following:

Code:
background="http://www.mydomain.com/images/image.gif"

If this does NOT work, then please provide a link to your ACTUAL header.txt file!

This is 90% HTML issue, which you should really pursue looking at HTML tutorials for assistance in coding.

Quote:
One more thing:
in the db_utils.pl,
should this be set to 0 or 1 ?
# Print out the headers if they haven't already been printed.
#
if (!$html_headers_printed) {
print "HTTP/1.0 200 OK\n" if ($db_iis or $nph);
print "Pragma: no-cache\n" if ($db_nocache);
print "Content-type: text/html\n\n";
$html_headers_printed = 1;
}
}[/code]
Keep this set to 1!!

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------







Quote Reply
Re: Body background and table background images In reply to
Re did everything.
Find header here: http://greaterhamiltonarea.com/links_pages/header.txt

Find actual Links Pages here:
http://greaterhamiltonarea.com/links_pages/

Find example of header.txt (in html form) here:
http://greaterhamiltonarea.com/links_pages/indextrialforlinksheaders.html

The reason that I don't think this is just a simple html code issue, is that the code works correctly (in NN & MIE) when not being called as a header.txt, through the links script. I must be overlooking something simple.

Your advice appreciated!

Quote Reply
Re: Body background and table background images In reply to
Understanding directory structures in servers is HTML. You have to understand location of files in order to properly reference them and also link to pages and files!

Wink

That is the structure of hypertext documents (uh...Hypertext Markup Language...HTML). Also, knowing difference in codes, like .css files is also HTML.

Uh...I have edited your file for you....Using codes that should show up similarly in both browsers and versions (tested with MIE 4.0, Netscape 4.5, Netscape 4.7):

Code:
<div align="center"><center>
<table BORDER=7 CELLSPACING=6 CELLPADDING=6 WIDTH="80%" BACKGROUND="http://www.greaterhamiltonarea.com/images/greymarblbg.jpg">
<tr>
<td>
<center>
<font color="#000099" face="Benguiat Bk BT" size=+3>
GreaterHamiltonArea
</font>
<img SRC="http://www.greaterhamiltonarea.com/images/globesmer.gif" BORDER=0 height=20 width=20>
<font face="Arrus BT" size=+2>
<b><i>
com
</font>
</i></b>
</center>
</td>
</tr>
</table>
</div></center>

Note: One of the differences is that the outside border of the table shows up gray in Netscape. The problem with the font differences between the web browsers is attributed to the use of the .css file. Try using the span/class codes in your header.txt and see if that clears up the problem. OR delete the .css file and delete all span/class codes from your template files.

Cascading Style Sheets do not show up consistently between web browsers. For example, hovering text only works in Netscape 4.7. It works in MIE 4.0 and above.

Again...this raises the issue I brought up before that image backgrounds in tables DO show up differently between browsers.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------







Quote Reply
Re: Body background and table background images In reply to
Thanx Eliot,
I saved your code in the header.txt file
and uploaded it to same place.
I did not see a change.
Another example of where we use a dark background image for an html page-background, with a white background image over-top, -AND the same table with a background image for a logo is at:
http://www.fraservalleybc.com
at the FVBC site the page background is burgundy (not grayish-blue), so you can see better the effect that is shown around the table border in NN.

Besides the table and background/font problem we are seeing, I don't think that my body settings are being correctly shown in the http://www.greaterhamiltonarea.com/links_pages index.

I'm going to have to put this away for tonight, I will take a good look at your last instructions again tomorrow and decide where to go from there.

Thanx :+)
Any further advice, I'll come to in the morning.
Quote Reply
Re: Body background and table background images In reply to
Welp...Then the problem is with the .css file! Remove it! CSS file SUCK! They are not compatible between browsers!

Also, if you make a transparent gif of your site logo, then that will solve one problem.

I don't know what you mean about the body not showing up correctly. The body anchors look fine to me. Although if you want to have a color background, like white, then you will need to add a bgcolor attribute to your body tag, like the following:

Code:
<body bgcolor="ffffff">

Remember to use high contrasting colors between your background color, and text and link colors.

Again...this problem is NOT directly related to LINKS. It is more of a HTML problem, which these forums are not meant to address.

Wink

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------







Quote Reply
Re: Body background and table background images In reply to
   
Quote:
Here's hoping that that your knowledge and understanding of style-sheets grows along with my knowledge of Links & DBMan!

Thanks for the sentiment. However, the clear fact of the matter is that CSS codes DO NOT show up consistently between browsers.

Quote:
Now that's an option IF you do not want to have a means of making universal changes quickly and easily on your website.

I use global variables that I can change at any time in both DBMAN, LINKS, and my other cgi/perl scripts that are compatible across browsers and also a whole lot easier to manage!

Good suggestion though.

Wink

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. Smile
----------------------









[This message has been edited by Eliot (edited January 24, 2000).]

[This message has been edited by Eliot (edited January 24, 2000).]
Quote Reply
Re: Body background and table background images In reply to
Code:
body {
color: #000000;
background: #FFFFFF url("http://greaterhamiltonarea.com/links_pages/background.gif") repeat-y;
}

I know the .css file you're using validates without warning at jigsaw.w3.org/css-validator/ however, you may find more success in using code which is better suited for both browsers: (works for us in IE/NN 4.*)
Code:
BODY { background: white; background-image: url("http://greaterhamiltonarea.com/links_pages/background.gif")}

The color: #000000; you have defined in your body tag is actually defining the if otherwise unspecified, font color to be used within the body of the page. Reference "This property describes the foreground color of an element's text content" from the w3.org page above.

Same is true for your TABLE tag, should be:
Code:
<table BORDER=7 CELLSPACING=6 CELLPADDING=6 WIDTH="80%" BACKGROUND-IMAGE="http://www.greaterhamiltonarea.com/images/greymarblbg.jpg">
or something along those lines. (You can check proper syntax at the w3.org URL listed above. Reference 14.2.1 Background properties:

Hope this helps with some of the style problems!


------------------
~ ~ ~ ~ ~
Karen

[This message has been edited by Karen (edited January 24, 2000).]
Quote Reply
Re: Body background and table background images In reply to
Or as I suggested do away with the CSS file all together!

Smile

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------







Quote Reply
Re: Body background and table background images In reply to
 
Quote:
Or as I suggested do away with the CSS file all together!

Now that's an option IF you do not want to have a means of making universal changes quickly and easily on your website.

Like everything else in this technology, there is a learning curve and it takes time to become familiar with something new.

Here's hoping that that your knowledge and understanding of style-sheets grows along with my knowledge of Links & DBMan!

------------------
~ ~ ~ ~ ~
Karen
Quote Reply
Re: Body background and table background images In reply to
Wow I sure appreciate all the input.
To let you know, I did not set the colour as you think to:

"The color: #000000; you have defined in your body tag"

I have set the bg colour in the "site_html.pl" file to :
$site_body = 'body bgcolor="#80B8C1" text="#2952C6" link="#3163FF" vlink="#00219C" alink="#942163" background="http://www.greaterhamiltonarea.com/links_pages/background.gif"';

I read the site_html.pl file and I thought it ment to put all the customizing code in that file.
It also said "
# If you set any colours or a background image using the body tag then you
# should use transitional DTD (MSIE3 does not use the CSS background and can cause the site
# to look strange it the browser default background color is set left as the default grey)
"
I thought I did this to, as I changed the DTD code in all the templates to:
#$dtd = '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"';
I guess I need a lesson in which file to actually make my changes in.
Am I suppose to put all my body tags into each template?
I thought by listing my globals in the site_html.pl file, that this would be done automatically.

I didnt understand that the script would run without the links.css file. I just delete it and take reference to it out of the templates, and then put all the body codes in each template?
This is sounding easy - if thats all there is to it.
I know the html code that I'm using, and its not showing up properly with that .css in there.

Quote Reply
Re: Body background and table background images In reply to
I just dont know why the simple header/footer and <body> is not working right.
Is there another file I need to put info into?
If I delete the .css file, and take out all reference to it in the templates, will the script work right?
Will my headers look right?
Will my <body> tags show up correctly?
THanx

[This message has been edited by RipandRev (edited January 24, 2000).]