I have two php page page1.php and page2.php
page1 have a another css and page2 have another css file linked.
now when i'm using the page 1 in page2 using include("page1.php")
;
then the css file of page1 is interrupting the style of the page2 .
how can i resolove that.
My Answer:
One way to resolve this issue is to use a separate CSS file for the included page (page1.php) that does not interfere with the styles of the main page (page2.php).
You can create a specific CSS file for page1.php and include it only in that page. This way, the styles of page1.php will not affect the styles of page2.php.
In page1.php, you can add a link to the specific CSS file like this:
html
And in page2.php, you can include page1.php without including its CSS file:
php
include("page1.php");
This way, the styles of page1.php will be contained within its own CSS file and will not interfere with the styles of page2.php.
Rate this post
5 of 5 based on 3981 votesComments