Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6155583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:27:36+00:00 2026-05-23T20:27:36+00:00

The below table code in razor in a MVC View, generates a standard table

  • 0

The below table code in razor in a MVC View, generates a standard table lay out of rows and columns. What I am looking for is a way to style the rows so that they look different…. like a customised divs that have rounded corners and with color etc… Basically I dont want it look like a table at all, I want the data outputted in blocks/chunks (?) (one block for one row).. I hope I am making this easy to understand… for example a typical google page when you search has options on the left to click (for images, news, Videos etc) and once you click on a link the list on the right pane changes with entries .. I want my rows to look like that ..like blocks of data and not as a row and column structure…

<table>


  @foreach (var item in Model)
 {

<tr>
    <td>
        @Html.DisplayFor(modelItem => item.Name)
    </td>

    <td>
        @Html.DisplayFor(modelItem => item.Descr)
    </td>
    <td>
        @Html.DisplayFor(modelItem => item.Number)
    </td>


</tr>
}
 }

  </table>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:27:36+00:00Added an answer on May 23, 2026 at 8:27 pm

    I would suggest you don’t use tables. If you want maximum flexibility, you’re better off using <div> and <ul> elements and styling them accordingly, e.g.:

    <ul class="item">
        <li>
            <div class="name">@Html.DisplayFor(m => m.Name)</div>
            <div class="description">@Html.DisplayFor(m => m.Descr)</div>
            <div class="number">@Html.DisplayFor(m => m.Number)</div>
        </li>
    </ul>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using the table code below I was asked to draw out a list sorted
I have a table defined (see code snippet below). How can I add a
Below is the code of a simple html with a table layout. In FF
In the code below I am using a recursive CTE(Common Table Expression) in SQL
The code below works nicely. Each title in the MySQL table submission is printed
Would following the table below be the best way of determining the access type
Maybe this way it will make more sense. MySQL table Code: id1 | id2
Given a table like below, is there a single-query way to update the table
Working with MVC3, Razor, Jquery, Javascript. The below code loops through and displays a
I have a database table containing the following columns: id code value datetime timestamp

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.