Ive putted 2iframes of same site, in my website the problem is the site's logo and home, contact, links.., they are appearing in both frames and I dont want to show the same site logo and the home, contacts links.
How to do this? Is it possible?
Here's one article explaining quite like what i want but Im not getting clearly.
Please somebody explain me briefly.

Dani AI

Generated

— short answer: you can’t reliably remove a remote site’s logo or nav from inside an iframe unless the site cooperates. ’s prompt for clarity is right: you’re seeing the same header because both frames load the same page. ’s point about asking permission is important — proceed with technical fixes only if you have the right to reuse that content.

Two realistic approaches:

  1. Quick-and-dirty client cropping (no DOM access). Put the iframe inside a fixed-size container with overflow: hidden and shift the iframe to show only the area you want. It’s fragile (responsive layouts break it) but requires no server processing.
.container {
  width: 800px;
  height: 400px;
  overflow: hidden;
  position: relative;
}
.container iframe {
  position: absolute;
  top: -150px; /* move page up to hide header */
  left: 0;
  width: 1000px;
  height: 1200px;
  border: 0;
}

Limitations: many sites send X-Frame-Options or Content-Security-Policy that block framing, and same-origin policy prevents you from altering inner HTML — you’re only masking, not removing.

  1. Robust server-side extraction (recommended if you have permission). Fetch the page on your server, parse and extract the specific element (by id or selector), rewrite relative URLs, strip scripts, cache the result, and display the cleaned snippet on your site. This avoids framing limits and is stable across viewports, but must respect copyright and the source’s terms.
<?php
// fetch + extract example (simplified)
$ch = curl_init('https://example.com/page');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$html = curl_exec($ch);
curl_close($ch);

libxml_use_internal_errors(true);
$dom = new DOMDocument();
$dom->loadHTML($html);
$xpath = new DOMXPath($dom);
$node = $xpath->query("//*[@id='target-id']")->item(0);
if ($node) {
  foreach ($node->childNodes as $c) echo $dom->saveHTML($c);
}
?>

Troubleshooting: check browser console for framing errors, test across widths, add a clear attribution and link back, and prefer an official API or embed widget if the site offers one.

Recommended Answers

All 3 Replies

I don't understand what you're asking. What is the problem? You don't want the same site in both frames?

Ask them
using another site's content without attribution, is considered stealing
putting their site in your Iframe, is considered stealing
putting their content in your Iframe with their logo, is definitely considered stealing
If you ask them they may consider allowing you to access their content,

Prior post wasnt meant to be rude, if it is , sorry
I meant that for many webmasters, it is in their interests to share content, without the 'stealing' Their content in your site with a backlink, gets them higher google cred
my site ranks really well, I have multiple acredited links on other peoples web sites in similar industries, referencing my content displayed in their pages

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.