Combining CSS Files

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
halim
Posts: 2
Joined: Fri Mar 23, 2007 9:18 am

Combining CSS Files

Post by halim »

Version of script:1.5
Hosting company:Network Solutions

Hi,
I am using version 1.5 of the guestbook script and facing some difficulty in applying css styles. I already have my css file for the rest of my website however, when i used the header and footer files with gbook, things kind of changed... I am not able to apply my web site style to the gbook.
My questions:
1. Can i use 2 css files on a website? and at the same time use the header and footer files?
2. Can i just combine the css file of gbook into my website css file?

THanks for your help in advance.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

You can do both 1. and 2., but combining the two is probably easier, just copy contents of your CSS file and paste it into the style.css from GBook.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
halim
Posts: 2
Joined: Fri Mar 23, 2007 9:18 am

Combining CSS

Post by halim »

Hi,
Thank you for your reply. I have tried that, however the gbook html final file is now using one of the CSS files only. If i use my site's css then the gbook is not matching, and if i use the gbook css the web site does not work properly. any ideas?
Thanks
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Maybe if you post a link to your GBook I can have a look, not sure what the problem is otherwise.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
gildionne
Posts: 18
Joined: Thu Nov 16, 2006 4:21 pm

Post by gildionne »

I know that this is a stale topic, but the original problem does not appear to have been resolved, as of the last message posted. A simple solution that will work relies on the ability to give HTML and CSS tags an identifier, such as "class=", or "id="

I know that version 1.5 of gbook uses the parameter 'id="gbook" ' on it's 'body' tag. Adding "#gbook " (note the single space after the 'k') in front of each gbook style rule, will tell CSS that this rule only applies to elements that are contained in the specific block of code identified with the 'id' of 'gbook'. Now if these modified styles are appended to the bottom of another style sheet, there should be no conflicts. Everything on a single sheet. Makes it easier to match gbook to your page.

Just make sure that you change gbook to reflect the correct location of your style sheet.

Here is an example of what the modified style will look like.
#gbook body, #gbook td { color: black; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 11px; text-align: left;}

I hope that this is information is useful to any others who are searching for solutions to the same problems.

Gil,
a happy user of gbook 1.5

"Search for answers first. Only then, if it's still necessary, Ask!"
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Thanks for sharing, will see if I can use something like this by default in the next version.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply