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

Activating a certain class to prompt a drop-down action

My PHP code is displaying data from my database, but there's a bug where both dropdown menus appear when I click the gear icon. I want only one dropdown to appear when clicking the gear of a specific project. Can you help me fix this issue? It's ...

The inner div overflowing at 100% dimensions

I'm working with an outer DIV that has a CSS property of position: fixed to serve as an overlay. Inside this, I have another div set to 100% width with a margin of 30px to create the appearance of an inner border frame. Unfortunately, the right and bo ...

Completely place one element with respect to its sibling element

I am currently facing a situation where I have implemented a Navigation bar wrapper that reveals an overlay across the entire page when clicked. In order for this setup to function correctly, all the elements that the overlay covers must be sibling elemen ...

What steps should I take to eliminate the white gap between the paragraph and the footer on my webpage?

If you're new to html and css, feel free to check out the url [file:///Users/CatherineDu/百度云同步盘/practice/about.html]. I'm currently working on building a simple website and facing an issue - there are unwanted white spaces between the ...

Adjust the position if the height exceeds 100 pixels

Can someone help with this code issue? $(document).ready(function () { if ($('.pi-img').height() > 100) { $(this).css('top' , '30%'); console.log('yeah'); } }); I am encountering difficu ...

Why is the defaultDate property not functioning properly in Material-UI's <DatePicker/> component with ReactJS?

I recently implemented the <DatePicker/> component from Material-UI ( http://www.material-ui.com/#/components/date-picker ) in my project. I encountered an issue while trying to set the defaultDate property to the current date on my computer, as it r ...

Display of items in a submenu through a drop-down menu when hovering over it

As I work on creating a Navbar with a dropdown menu, I'm encountering an issue where hovering over the main list element displays all the submenu contents at once. No matter what I try in my CSS, including adjusting the positioning of li and ul elemen ...

Having trouble with Uploadify on ASP.NET WebForms?

I am currently working on incorporating Uploadify into an ASP.NET webforms project. However, I have encountered an issue where my script is not triggering the generic handler. Below is the script that I am using: <input id="fileInput" name="fileInput" ...

"Develop a mobile application using PhoneGap designed specifically for use on iPad and

Looking to create an app for iPad and iPad Mini using PhoneGap. While I have some basic knowledge of HTML and CSS, I am struggling with adjusting the image proportion, width, and height of the app. I want to write code that will adapt properly to the vary ...

Troubleshooting: ngAnimate max-height failing to apply to specific element

Having integrated ngAnimate into a project to enhance animations, I've encountered some unusual behavior with a specific element. Let me provide some context: our website features a shop with categories and products within those categories. I am usin ...

The background extends beyond the confines of its container

I'm facing some challenges trying to create this specific layout, particularly with setting a background that should cover 50% of the screen size. My initial thought was to use an image as the background, but I need different colors for each page. ht ...

Adjust the height for just one md-tab

Looking to find a way to set the height of the content within an <md-tab> element to be 100% in a flexible manner. For example, consider the following structure: <body> <md-content> <md-tabs> <md-tab label= ...

Can anyone provide a reference or resource that explains the best scenarios for utilizing display:block, display:inline, and display:inline-block, and the reasons behind their usage?

Can you recommend a quality article discussing the guidelines for using display:block, :inline, and :inline-block in CSS, along with explanations on when to utilize each one? Additionally, in what scenarios should we override the display property through ...

Customizing jQuery dialog: What is the best way to change the appearance of the close button?

I am struggling to style the close tag in my jQuery dialog box. I have looked through the documentation and tried various CSS alterations, but nothing seems to be working. Any suggestions or insights would be greatly appreciated. My code is provided below ...

Ensure that Mathjax underscores are consistent with the height of other characters

Presented below is the latex code being used with Mathjax. \class{mathjaxCursor}{\text{_}} ...and here is the accompanying css: .mathjaxCursor { font-weight: bold; background-color: red; } This setup results in the following display: ...

What is the best way to navigate between elements using AJAX?

My experience in Ajax is minimal. I've managed to create two <li> elements with <a> elements inside, each linking to different HTML files. My goal is for clicking on a link to automatically load the corresponding HTML file without refreshi ...

Setting character limits within textareas based on CSS classes in a dynamic manner

I'm looking to develop a JavaScript function that can set text limits for multiple textareas at once using a class, allowing for flexibility in case specific textareas need to be exempt. However, I'm facing issues with my debuggers - Visual Studi ...

The navigation bar in responsive view on Bootstrap 4 causes the content below it to shift

Recently I have been exploring bootstrap-4 and encountered an issue while creating a nav-bar. The problem is that in responsive view, when toggling the nav-bar it simply pushes the content below it. Is there any way to address this issue within (bootstra ...

Discover the position of a div relative to another div using ng-drag-drop

I'm currently working on a web application that allows users to create their own identity cards. For this project, I am incorporating the ng-drag-drop library from https://www.npmjs.com/package/ng-drag-drop. The main goal is to obtain the coordinate ...

A complete div component with a minimum height that is sandwiched between a fixed size header and

I'm currently facing a challenge with setting up my webpage due to the height of my elements causing a bit of a frenzy. Specifically, I have a specific layout in mind: At the top, there should be a header that has a fixed height (let's say 150p ...