Hello once again...

I have the sidebar and the header common in all the pages which are made in PHP.. The sidebar and the header are in an html..

But when i include them in my current pages(the one made in PHP) than the style sheets of both clash and the required output is not generated..

Plz Help..

Can you give us a screenshot of how they look like after you have included it in you PHP? and if possible a snippet of the code where you inserted the sidebar and headers.

hello..
I have an attachment with this message...
Plz kindly refer it..


It explains all my problem..
Plz help soon...

Are you using similar IDs in each style sheet? Each element should have an id which sepearates it from everything else.

This is all I could think of at the moment.

Hi.. I used different id's in all the files..

but couldnt get the problem.. :sad:

Member Avatar for Rhyan

Hi.. I used different id's in all the files..

but couldnt get the problem.. :sad:

Can you post the sources both of the 2 css files and the 2 pages you use?
Will take a look on it and advise.

Hello..
M extremely sorry for the late reply..

I am attaching all the files which are having the problem..
When i run the menu.php the stylesheet of it and sidebar.php conflicts..

Kindly have a look..

In this current attachments i am facing problem uploading the style.css and emx_nav_left.css files so have renamed it to .php resp...
So even u kindly rename the files to style.css and emx_nav_left.css resp..

Thank u...

Member Avatar for Rhyan

Hello..
M extremely sorry for the late reply..

I am attaching all the files which are having the problem..
When i run the menu.php the stylesheet of it and sidebar.php conflicts..

Kindly have a look..

In this current attachments i am facing problem uploading the style.css and emx_nav_left.css files so have renamed it to .php resp...
So even u kindly rename the files to style.css and emx_nav_left.css resp..

Thank u...

I have looked in your code and it is completely messed up, my friend!

1. You have never attached the stylesheets to your pages. You have used in-line styles instead, that are messing the whole thing.
2. You have attached the style on the wrong place - you are adding styles inside the <body></body> element. Please note you have to add the <style ...></style> definitions in <head></head> section, not in body.
3. You are trying to include a page that has html head and body elements, so this results in conflicts with both pages. Note you are trying to include the second page before setting the headers of the first page, so it gets completely messed up.

I can do it for you, but you will never learn if you don't do it, so I will give you a short guide, and you have to fix it by yourself. So, start like this:

1. Edit your MENU.PHP file. Make the structure like this:
1. Add html opening tag.
2. Add <head> tag
3. Add meta tags for content
4. Add title tags
3. Add the Javascript section
4. Add the first css file, that defines styles for this menu.
5. Add the second css file, that defines styles for the second page.
6. Close the </head>.
7. Open the <body>
8. Enter the code of your right-hand menu.
9. After you finished with the right menu add the php include <?php

<?php
include '../sidebar/finalside.php';
$id=$_GET['custid'];
#echo $id;
?>

10. Close all elements like div-s.(Dreamweaver should guide you!)
11. Close </body> and </html>

2. Edit your finalside.php removing all tags like <html><head><body>. Leave only the tags that represent your content like <div><table> etc. You don't need the html, head and body section into this file, as it has been already defined in the menu.php.

That's all - it should work if you have done it correctly.

thank u a lot..
m new to php.. so ur guidance wil definitely help me..
wil b doin the changes u said 2om frm my work place.. as have got no documents here..
n tan wil get back 2 u..

hello sir
we implemented what u said...but still it's showing error...


I have attached the modified file...kindly help...

Member Avatar for Rhyan

hello sir
we implemented what u said...but still it's showing error...


I have attached the modified file...kindly help...

My friend,
Is this what you expect to see? If yes, then I will guide you.

Awaiting

yes..
this is exactly what we want..
thank u so much for ur guidance..

Member Avatar for Rhyan

yes..
this is exactly what we want..
thank u so much for ur guidance..

Ok, I have edited what is needed and I have put a lot of comments there, so you should be able to read it.

Note that the way I have changed things, you need to store them in the same dir, all 3 files together. If you change them in different folders, you have to change paths to one another.

Stick to the books, you have a lot to read about css, html/dom and php. You got the idea, now you have to learn how to match all the things together!

Good luck.

P.S I have changed the .css file to .php to avoid problems - you have to rename it back to css.

Thank u vry vry much..
We would be definitely goin thro more books..

Good Luck 2 u 2..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.