Hi,

I am new in web design.So,I need your help. Because i build my carrer as a web developer.
please visit this site:

please go catagory link and i want my header section, Add purpose section and footer section in catagory page just look like home page with content section.please you just design content div with header,addpurpose & footer section.I am failed to do this.Hope you understand.

<div class="header_logo"></div>
<div class="header_manu"></div>
<div class="user_purpose"></div>
<div class="content_cate"></div>
<div class="add_purpose></div>
<div class="footer"></div>

please help me with css and codes...
If possible you can also describe how can i do this it myself.

Regards,

Dani AI

Generated

Two things usually cause the header/add-purpose/footer to be missing on a category page that works on the home page: (A) the PHP include is failing (so the template pieces never reach the browser), or (B) the template HTML is present but hidden/overlapped by CSS. Quick diagnosis should distinguish those two paths.

First-level checks (fast):

  • View the generated HTML (View Source / Inspect Element). If the header/footer HTML is present, it’s a CSS/layout issue. If it’s absent or the page is blank, the include probably failed.
  • Enable PHP errors while debugging so a missing include or fatal error is visible.

Example of a robust include pattern and error enabling:

// at top of the category page (temporary while debugging)
ini_set('display_errors', 1);
error_reporting(E_ALL);

// use absolute paths to avoid relative-path confusion
require_once __DIR__ . '/includes/header.php';

// ... category content ...

require_once __DIR__ . '/includes/footer.php';

Notes: require_once causes a fatal error when the file is not found; include_once issues a warning and continues. Prefer __DIR__ (or $_SERVER['DOCUMENT_ROOT']) to avoid mistakes when files live in different folders.

Common pitfalls to verify:

  • Relative path mistakes (category files living in subfolders change what ../ points to).
  • Case-sensitive filenames on Linux hosts.
  • File permissions or ownership preventing reads.
  • An included file that contains exit/die or sends a redirect before output.
  • Byte Order Mark (BOM) at the top of included PHP files interfering with headers.

If the HTML is present but invisible, check for display:none, absolute positioning, z-index overlap, or floats not being cleared. A small clearfix can help:

.wrapper::after{ content:""; display:table; clear:both; }

As and pointed out, the exact PHP that performs the include and any server error output are required for a precise diagnosis. The checklist above covers the usual causes and will resolve most header/footer visibility problems.

Recommended Answers

All 4 Replies

What is the problem you are having with require_once ?

Hi,
please visit above link and click on c# language link under catagory.In this page(c#language) i want header section , content section, addpurpose section and footer section are visible.but i cant do this.
so,please can you do this for me?
I think you understand....or not please reply me.

THanks

What is your problem with require once? and please be specific on what you are trying to accomplish.

cant do this.
so,please can you do this for me?

Can not help you without knowing what you really want. Post your php code you did so far. I will point out the mistakes but no one will DO IT for you

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.