Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
problem loading 2 style sheets
Old 07-22-2008, 12:33 AM problem loading 2 style sheets
Super Talker

Posts: 119
Trades: 0
So i've got an interesting problem. My website is html, but I have the MIME type setup to execute html as php.

I have a couple of pages that use php includes, to include a php file in my html, this is why html is executed as php.

I have a shoutbox i found somewhere that uses a style tag, and some CSS for its display. My website also uses css (xhtml 1.0 transitional).
When the page loads, it loads its style info, and when it gets to the included php file, also loads its style info, and it throws everything out of place.

Is there a way to do what I'm doing, without confusing the styles?


www.teamspeakdisplay.com (not fully functional)

username: user
password: teamspeakdisplay
BigJohnny is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-22-2008, 04:43 AM Re: problem loading 2 style sheets
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
styles need to be loaded into the document head, preferably as an external style sheet.

So move your style rules external and load them in the <head> section
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-22-2008, 08:27 AM Re: problem loading 2 style sheets
Super Talker

Posts: 119
Trades: 0
Well, I know that, the main HTML page, loads its style in the its head. The shoutbox.php file also is loading its style in its head.

The problem is after the mainpage loads, it loads the shoutbox which then is loading its own style midway through the HTML page.

Ive treied removing the style from the php file, and putting it in the head of the html file, but that didn't work.

How do i move the style to an external file, and keep the site xhtml valid?
xhtml doesnt support the LINK property.
BigJohnny is offline
Reply With Quote
View Public Profile
 
Old 07-22-2008, 08:50 AM Re: problem loading 2 style sheets
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
it loads the shoutbox which then is loading its own style midway through the HTML page.
and you need to stop it doing so, by making it load in the right place.

Quote:
xhtml doesnt support the LINK property.
You know, you are absolutely right! And the reason for that is ...

Everything in XHTML has to be in lower case!!!
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-22-2008, 09:03 AM Re: problem loading 2 style sheets
Super Talker

Posts: 119
Trades: 0
well..... Ive moved the style sheets external, but not its invalid due to the way the shoutbox loads. Its basically loading an external stylesheet in the middle of the page.

I think the shoutbox.php file needs to be cleaned up so its output its valid xhtml as well.
BigJohnny is offline
Reply With Quote
View Public Profile
 
Old 07-22-2008, 09:05 AM Re: problem loading 2 style sheets
Super Talker

Posts: 119
Trades: 0
Quote:
Originally Posted by chrishirst View Post
and you need to stop it doing so, by making it load in the right place.


You know, you are absolutely right! And the reason for that is ...

Everything in XHTML has to be in lower case!!!

you know, i knew that..... but up until you said that, It didn't occur to me that when i tried that previously, i was using LINK and not link .....

im going to have to include the php code directly in the site, instead of using a php include, or find an alternative to style the shoutbox that doesn't conflict with the html pages style, or load an external style sheet midway through the page.
BigJohnny is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to problem loading 2 style sheets
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.96751 seconds with 12 queries