take a paragraph element outside of a container div

In my ASP project, I have incorporated JavaScript and CSS code that I obtained from JonDesign's SmoothGallery demo website. Now, I am trying to move the p tag containing the summary out of the div. Here is the current code snippet:

<div id="myGallery">
    <asp:Repeater ID="HeadLinesRepeater" runat="server" DataSourceID="SqlDataSource1">
        <ItemTemplate>
            <div class="imageElement">
                <h3><%# Eval("Title") %></h3>
                <div>
                    <p><%# Eval("Summary") %></p>
                </div>
                <a href='<%# "/NewsBody.aspx?NewsId=" + Eval("ID")  %>' title="Read More" class="open"></a>
                <img class="full" src='<%# "/Img/news/" + Eval("ID") + ".jpg" %>' />
                <img class="thumbnail" src='<%# "/Img/news/" + Eval("ID") + ".jpg" %>' style="width: 100px; height: 75px" />
            </div>
        </ItemTemplate>
    </asp:Repeater>
</div>

CSS:

    .jdGallery .slideInfoZone p {
            float: right;
            margin-bottom: 10px;
            z-index: 1000000;
            position: absolute;
            margin-left: 92px;
            width: 300px;
            right: 670px;
            top: 220px;
            font-family: Tahoma;
            font-size: 10pt !important;
            text-align: justify;
            color: white !important;
            padding: 0;
            font-size: 60%;
            margin: 2px 5px;
            color: #eee;
        }

I found that changing the position to fixed resolves the issue, but when the site is viewed on different resolutions, it becomes disordered and overlaps with other divs. This project is for my university, so any help would be greatly appreciated.

Answer №1

To physically cut the

<p><%# Eval("Summary") %></p>
, move it outside of the div.

UPDATE

Consider hiding the inner p element with display:none, then utilize JavaScript (ensure JQuery is included on this page) to select all paragraphs and relocate them within the DOM.

It appears (based on your feedback) that you may need to adjust the script that modifies the parent div to not rely on the internal paragraph, or modify it to function with the paragraph in a different location within the DOM structure.

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

Adjust the transparency of a distant div element by using CSS checkboxes without any JavaScript

I'm faced with the challenge of manipulating the opacity or animating an array of items that are all contained within a single div. In addition to altering the opacity of each individual item, I also want to change the opacity of the entire div and it ...

What is the best way to apply box shadow to a particular region using CSS?

I am looking to add a box shadow using CSS, but I only want it in a certain area of the box. In the screenshot above, you can see that I have a blue header on my website. I would like to add a shadow to this header, specifically in the position highlight ...

Guide to positioning a button on top of another button using Vuetify

I'm facing an issue where I want to add a button on a clickable card, but clicking the button also triggers the card click event. Here's my current code snippet: <v-card @click="show = !show"> <v-img src="https://cdn.vuetifyjs.com/im ...

Arrange components within the form

Just started experimenting with this a few days ago. In my form, there is a text field and a button that I want to align side by side at the center of the form. .row { width: 100%; margin-bottom: 20px; display: flex; flex-wrap: wrap; } .col-6 { ...

How can you style text with a circular border using CSS?

I'm struggling to locate an example of what I need. My goal is to make a circle around my text using CSS. While I've seen examples of circles with the text inside, in this case, I aim to have a circle surrounding the text. Here's an illustr ...

Steer clear of posting additional content that might bump the existing content further up

How can I keep the search bar centered on the screen, even when content is added below it? Here's a screenshot illustrating the issue: https://i.stack.imgur.com/7pQ1q.png The text in the image is causing the search bar to move up, but I want the sea ...

Utilizing pure CSS to target the first and last classes

I want to use pure CSS to select only the first and last classes throughout the entire document. In my scenario, the structure looks like this: <div class="Container"> <div> <div class="Parent"></div> <pre> ...

Using an icon font as a background in CSS attribute

I am struggling to replace a background image in CSS with an icon font instead of an icon image. I have been unable to accomplish this task. Here is the CSS property I am working with: .social-networks .twitter{background:url(../images/social/twitter.png) ...

Looking to effortlessly move and arrange items with ng2-drag-drop in Angular 2?

I have encountered a problem with the ng2-drag-drop library. I am trying to drag and drop items from one div to another, and then freely move the dropped item within the droppable area. One issue I'm facing is that when I drop my draggable item in th ...

Error Encountered: Bootstrap Dropdown Menu Malfunction in Master Page

I'm struggling to make my Bootstrap drop down menu function properly. Nothing happens when I click on the link, no dropdown appears. I've set up my nav bar in a master page and have spent hours trying to troubleshoot it without success... This i ...

Issue with fadeout() on absolutely positioned element loaded via AJAX in jQuery

Currently, I am utilizing AJAXify on a website project to implement page transitions and encountering some abnormal behavior with jQuery. Below is my code: HTML (I am transitioning through backgrounds using jQuery) <div id="backgrounds"> <img s ...

What is the process for dividing a form into two separate columns?

I am working on a form that sends input to a PHP script. I want to reorganize the form so that the second section (Person 2) appears in a column to the right of the first section (Person 1), instead of below it. <link rel="stylesheet" href="test.css" ...

Challenges with text in a Bootstrap 5 responsive carousel

I'm currently in the process of developing a new website and I am utilizing bootstrap 5. One issue I have encountered is that the text and button within the carousel in the header section do not appear to be compatible. To provide better clarity, I wi ...

The value of the HTML input control vanishes once padding is added

I am in need of some assistance with CSS in formatting the text box for BID VALUE (input element) (See in Image 1) Image 1 The product link can be found here When I try to widen the text box using padding, the text value inside the box disappears (seems ...

What is the best way to stack div elements one after the other?

I am a complete beginner in HTML and I have a project for my web design class about a movie. http://jsfiddle.net/Lbo1ftu9/ <div id="footer"> <a href="D:/MOVIE REPORT/akira.htm" title="GO BACK?"><img src="D:/IMAGES/goback.gif"> My code ...

Selection tool for Material UI Fields

Is there a way to design something similar to this layout using Material UI? I'm looking to create a selection between fields. Any advice on how to achieve this in Material UI? ...

The astonishing font-icon animation feature is exclusively functional on code-pen

I have a problem with a font-icon animation code. When I run it on my local server, the animation doesn't work. It only works on http://codepen.io/TimPietrusky/pen/ELuiG I even tried running it on http://jsfiddle.net/qjo7cf3j/ @import url(http: ...

Add an arrow or triangle at the tip of the line

I am currently working on recreating the design of lines with an arrow or triangle at the end side of an Input form. The inspiration for this comes from an old flash application that is now being converted to HTML5: https://i.sstatic.net/OCpif.jpg So far, ...

Retrieve various Hyperlinks from database for presentation within a gridview

My objective is to include multiple Hyperlinks in a single cell of a gridview, separated by commas. The approach I have considered is to generate the HTML code during data retrieval. I have devised a simple query that creates a series of Hyperlinks based ...

Hey there, I was wondering if it's possible to modify the color of the navbar when scrolling on a specific page

After the first 3 pages with a black background and a transparent navbar with white navigation items, I encounter visibility issues when scrolling to the colorful 4th page. Is there a way to change the navbar color on this specific page using ONLY HTML a ...