ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Casual CSS user.
I have a small BASIC program that creates HTML scripts which all have their own CSS section between the <head></head> tags.
This CSS section includes random colours selected by the BASIC program.
These HTML scripts are then saved as a .PHP file which is called by a PHP "include" from other html.php scripts.
When these scripts created by the BASIC program are run from the console, they render properly, but when they are run from another PHP script through the "include", the colours of the first one are used for the following scripts although the rest renders properly.
It seems the <style type='text/css> .....</style> of (BASIC created) scripts are ignored starting from the second script.
The calls to these scripts are all made from within the same <table></table> in the calling script.
Could anyone tell me what could the problem be? Or am I doing something invalid?
Thank you for your help
example:
main script.php
....
<table ....><tr><td>
text
include basic made script 1
text
include basic made script 2
text
include basic made script 3
text
</td></tr></table>
....
Casual CSS user.
I have a small BASIC program that creates HTML scripts which all have their own CSS section between the <head></head> tags.
This CSS section includes random colours selected by the BASIC program.
These HTML scripts are then saved as a .PHP file which is called by a PHP "include" from other html.php scripts.
When these scripts created by the BASIC program are run from the console, they render properly, but when they are run from another PHP script through the "include", the colours of the first one are used for the following scripts although the rest renders properly.
It seems the <style type='text/css> .....</style> of (BASIC created) scripts are ignored starting from the second script.
The calls to these scripts are all made from within the same <table></table> in the calling script.
Could anyone tell me what could the problem be? Or am I doing something invalid?
Thank you for your help
example:
main script.php
....
<table ....><tr><td>
text
include basic made script 1
text
include basic made script 2
text
include basic made script 3
text
</td></tr></table>
....
Does the resulting page validate? Run it through the validator at validator.w3.org.
I suspect that you have <head> elements inside the <body>.
I didn't think about testing it that way first.
It seems the CSS part of the scripts are ignored from the second script, in other words: the CSS part of the first scipt is applied to all scripts. There is probably a conflict between the various CSS definitions between all the scripts but my experience with CSS is not good enough to work out what it is.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.