show the link's information within a designated section

I am currently working on a website project that features three links in the side bar named Story 1, Story 2, and Story 3. I would like to implement a feature where clicking on any of these links will display the corresponding content in the main blue division (main1). How can I achieve this functionality?

<style>
    #wrapper{
    color:#FF00FF;
    margin:0px auto;
    padding:0px;
    width:1050px;
    height 1000px; 
    }

    #header
    {
    margin:0px;
    padding:0px;
    width:1000px;
    height:100px;
    background-color:#F74E84;
    }
    #content
    {
    margin:0px;
    padding:0px;
    width:1000px;
    }

    #side
    {

    border-right:dashed;
    border-right-color:#F74E84;
    margin:0px;
    padding:0px;
    width:247px;
    height:700px;
    background-color:#F7C9D8;
    float:left;
    }
    #side ul { list-style-type: none; }
    #side a { text-decoration:none;
              color:black;}
    #main
    {
    background-color:red;
    margin:0px;
    padding:0px;
    width:750px;
    height:700px;
    float:right;
    }
    #main1
    {
    margin:0px;
    padding:0px;
    width:750px;
    height:650px;
    background-color:#DFE4E9;
    float:right;
    }
    #footer
    {
    margin:0px;
    padding:0px;
    width:750px;
    height:50px;
    background-color:#F74E84;
    float: right;
    }

    </style>
    <div id="wrapper">
            <div id="header"> Header </div>
        <div id="content">
        <div id="side"><p>Here is navigation</p>
<ul>
<li><a href="text.html">Story 1</a></li>
<li><a href="Second.html">Story 2</a></li>
<li><a href="Third.html">Story 3</a></li>
</ul></div>
        <div id="main">
        <div id="main1">
        <p>This is my web site </p>
        </div>
        <div id="footer">Footer</div>
     </div>
     </div>
     </div>

Answer №1

To incorporate an iframe within the div, provide it with an id such as 'the_frame'. Next, include a target attribute in your links with the identical value.

<a href="http://www.website.com" target="the_frame">website</a>

<iframe id="the_frame">  <!-- the link will be displayed inside this area -->
</iframe>

It's important to note that numerous websites restrict embedding their content within iframes due to security concerns. However, this method should function effectively for pages located on your own site (though this may vary based on server settings).

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How come using float:right causes the div to float towards the left instead?

I am new to CSS and currently facing a problem with positioning a div (#inner) in the bottom-right corner of another div (#container). Initially, I used float: right;, but upon inspecting the Html, I noticed that the inner div is appearing in the bottom-le ...

Is the onmouseover / onmouseout transition failing to function properly?

Is there a way to make the ease-in-out effect work without modifying the HTML code? http://jsfiddle.net/68ojLg6p/ <img class="transition-img" onmouseover="this.src='http://1.bp.blogspot.com/-ISjKMLTnaTQ/Ty-USX-J1uI/AAAAAAAAC_0/YB6MUMflRmg/s400/fe ...

Looking to export a high-quality topographic image?

Is there a way to export the topographical map from this website in high resolution? The map on Google Maps is lacking in detail and important information. The topographical map of Svalbard on the website mentioned is truly impressive, but unfortunately ...

Customize Material-ui ListItem styles using @media queries

Looking to customize the appearance of ListItem in material-ui. My list of elements is populated and then returned to a Popover. elms.push(<ListItem key={i} primaryText={obj[i].title} onTouchTap={this.addGeotag.bind(this, obj[i])}/>) Adding style= ...

Convert an HTML file to .msg format or prevent the send button from functioning in Outlook messages

I am trying to figure out how to save an HTML file as a .msg format in order to send it later. The HTML is basically a mock of a regular email with just the basic features like from, to, cc, subject, and body. I'm not quite sure how to go about achiev ...

What is the process for transferring a two-dimensional string array from Java code to a scala.html file in the Play framework?

Currently facing an issue where I am receiving an error message stating "'[' expected but integer literal found" while trying to initialize the string array with the line of code "arr[i][j]="string";". My goal is to showcase this 2D array in a ta ...

Disappearing table borders in print view on Firefox

I have been working on creating a printable table that displays correctly in Chrome. However, when viewed in Firefox, the table borders are not showing up. <body> <table> <tbody> <tr> ...

Arranging div blocks in columns that are seamlessly aligned

I am dealing with a situation where I have several boxes or blocks arranged in a 3-column layout. These boxes are styled using properties like float: left, width: 33%, but they have varying heights. Is there a way to make sure that the boxes always fill i ...

Mixing strings with missing slashes in links

console.log(mylink) When using the console to log mylink, the expected result is a normal link like http://example.com/something.jpg. I tried concatenating it as shown below: var html = '<div id="head" style="background:linear-gradient(rgba(0, 0 ...

Tips for positioning icons on the navigation bar using Bootstrap: How to display the icon on the right side and at the top of the

I am trying to position the arrow icon on the right side of the navigation bar, currently it looks like this: https://i.sstatic.net/35wef.png But I want it to look like the screenshot below: https://i.sstatic.net/lvvAM.png <div id="sidebar-wrapper"& ...

Styling with CSS: Display an image next to the content area on both the left and right

Currently, I am working on implementing CSS positions for images and backgrounds. My main struggle lies in trying to display the same image next to the content area while ensuring its position is not affected by page resizing. Can anyone provide guidance ...

Building a JavaScript module worker: Step-by-step guide

I am currently facing challenges with implementing web workers in my program. The example provided here is a simplified version of the code structure. There are 4 key files involved: index.html <!DOCTYPE html> <html> <head> <me ...

Substituting Div containers with elements imported from external files

Imagine I have <div> <div id="stuff"> <!-- stuff --> </div> </div> Could I move the content of <div id="stuff"> into a separate file named stuff.html, and then replace the code above with something simi ...

I aim to showcase particular cookies within an input field using jQuery

I am seeking a way to create a responsive page that showcases cookies. My goal is to have the output of a function automatically appear in the input value upon loading the page, instead of requiring a click event. Here is the code snippet I have been worki ...

increasing the size of a picture without resorting to a pop-up window

Struggling to implement a product details tab within a table that features a clickable image. When the image is clicked, it should enlarge but the width doesn't adjust accordingly. I'm using bootstrap 5.3 and can't seem to identify the root ...

Ways to center a div with position:relative vertically on the page

What is the best way to center a position relative div vertically within its parent element? For example: <div class="parent"> <div style="position:relative;" class="child"> </div> </div> Any suggestions on how to vertic ...

DIV that can be removed and dragged around, as well as replaced

I plan on creating a few <div> elements and I am looking to have the ability to move and replace these Divs. After doing some research, I believe that jQuery could help me achieve this. I came across the following code snippet: <script> ...

Incessant spinning circle animation in Javascript persists without pause during page loading

After spending several hours on it, I'm still struggling to understand why my code isn't working. The goal is to create an animation of a spinning circle during the page load. The code I have so far accomplishes this, but the issue is that it ne ...

Reducing the Size with Jquery Tools

I am looking to create a unique screen using JQuery Tools (or just JQuery) and HTML5. The screen will feature a main panel with rounded square buttons. When a user clicks on one of these buttons, the panel will shrink and move to the left side while reveal ...

Unlock the power of Bootstrap CDN with these easy steps!

I am currently trying to incorporate a CDN for Bootstrap in order to enhance the performance of my website. Surprisingly, directly referencing the CSS works perfectly fine but using the CDN does not. Could someone provide me with guidance on how to resolv ...