Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
.NET
.NET Core
.NET MAUI
.NET Standard
Active Directory
ADO.NET
Agile Development
AI
AJAX
AlbertAGPT
Alchemy
Alexa Skills
Algorand
Algorithms in C#
Android
Angular
ArcObject
ASP.NET
ASP.NET Core
Augmented Reality
Avalanche
AWS
Azure
Backbonejs
Big Data
BizTalk Server
Blazor
Blockchain
Bootstrap
Bot Framework
Business
Business Intelligence(BI)
C#
C# Corner
C# Strings
C, C++, MFC
Career Advice
Careers and Jobs
Chapters
ChatGPT
Cloud
Coding Best Practices
Cognitive Services
COM Interop
Compact Framework
Copilot
Cortana Development
Cosmos DB
Cryptocurrency
Cryptography
Crystal Reports
CSS
Current Affairs
Custom Controls
Cyber Security
Data Mining
Data Science
Databases & DBA
Databricks
Design Patterns & Practices
DevExpress
DevOps
DirectX
Dynamics CRM
Enterprise Development
Entity Framework
Error Zone
Exception Handling
F#
Files, Directory, IO
Flutter
Games Programming
GDI+
General
Generative AI
GO
Google Cloud
Google Development
Graphics Design
Graphite Studio
Hardware
Hiring and Recruitment
HoloLens
How do I
HTML 5
Infragistics
Internet & Web
Internet of Things
Ionic
Java
Java and .NET
JavaScript
JQuery
JSON
JSP
Knockout
Kotlin
Langchain
Leadership
Learn .NET
Learn iOS Programming
LINQ
Machine Learning
Metaverse
Microsoft 365
Microsoft Fabric
Microsoft Office
Microsoft Phone
Microsoft Teams
Mobile Development
MongoDB
MuleSoft
MySQL
NEAR
NetBeans
Networking
NFT
NoCode LowCode
Node.js
Office Development
OOP/OOD
Open Source
Operating Systems
Oracle
Outsourcing
Philosophy
PHP
Polygon
PostgreSQL
Power Apps
Power Automate
Power BI
Power Pages
Printing in C#
Products
Progress
Progressive Web Apps
Project Management
Public Speaking
Python
Q#
QlikView
Quantum Computing
R
React
React Native
Reports using C#
Robotics & Hardware
RPA
Ruby on Rails
RUST
Salesforce
Security
Servers
ServiceNow
SharePoint
Sharp Economy
SignalR
Smart Devices
Snowflake
Software Architecture/Engineering
Software Testing
Solana
Solidity
Sports
SQL
SQL Server
Startups
Stratis Blockchain
Swift
SyncFusion
Threading
Tools
TypeScript
Unity
UWP
Visual Basic .NET
Visual Studio
Vue.js
WCF
Wearables
Web API
Web Design
Web Development
Web3
Windows
Windows Controls
Windows Forms
Windows PowerShell
Windows Services
Workflow Foundation
WPF
Xamarin
XAML
XML
XNA
XSharp
Register
Login
2
Answers
Only 1st card expanding when clicked on other card link
Akash Patel
6y
507
1
Reply
I am working on a web application. I have a view in which there are cards three in a row. All the data is retrieved from database and bind using loop in view. There is a link named "read more" in each card in which when clicked expands it down showing more content.The problem is when click on link of other cards only 1st card is expanded and other cards aligns to right sides and not move down. Please help it out. Below is the code of the view
@using NiyaSpa.Models
@model Tuple<Booking, Customer>
<div
class
=
"inner-agile-w3l-part-head"
>
<h2
class
=
"w3l-inner-h-title"
>Facials</h2>
</div>
<div>
<p style=
"text-align:center; font-size:medium;"
>
We provide skin specific facials as listed below. Each contains 5-8 step treatments including cleansing, chemical or physical exfoliation, gel treatment, steam facial, toning and moisturizing. Our blood circulating facial massage allows products to absorb deep into the skin giving clients
long
lasting results.
</p>
</div>
<br />
<br />
<div
class
=
"accordion md-accordian"
id=
"accordEx"
role=
"tablist"
>
</div>
<div
class
=
"row"
>
<div
class
=
"card-deck"
>
@foreach (
var
facialservices
in
ViewBag.subServices as IEnumerable<SubService>)
{
<div
class
=
"col-md-4"
style=
"margin-bottom:20px;"
>
<!-- Card -->
<div
class
=
"card promoting-card"
>
<!-- Card content -->
<div
class
=
"card-body d-flex flex-row"
>
<!-- Avatar -->
<!-- Content -->
<div>
<!-- Title -->
<h4
class
=
"card-title font-weight-bold mb-2"
>@facialservices.Sub_ServiceName </h4>
<!-- Subtitle -->
</div>
</div>
<!-- Card image -->
<div
class
=
"view overlay"
>
<img
class
=
"card-img-top rounded-0"
height=
"100%"
width=
"100%"
src=
"https://mdbootstrap.com/img/Photos/Horizontal/Food/full page/2.jpg"
alt=
"Card image cap"
>
<a href=
"#!"
>
<div
class
=
"mask rgba-white-slight"
></div>
</a>
</div>
<!-- Card content -->
<div
class
=
"card-body"
>
<div
class
=
"collapse-content"
>
<!-- Text -->
<p
class
=
"card-text collapse"
id=
"collapseContent"
>@facialservices.Description </p>
<!-- Button -->
<a
class
=
"btn btn-flat red-text p-1 my-1 mr-0 mml-1 collapsed"
data-toggle=
"collapse"
href=
"#collapseContent"
aria-expanded=
"false"
aria-controls=
"collapseContent"
>Read More</a>
</div>
</div>
</div>
<!-- Card -->
</div>
}
</div>
</div>
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
i cant input more than 4 values in a tsxtbox, why?
Razor page in many paging problem