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 6371601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:05:52+00:00 2026-05-25T01:05:52+00:00

i was trying to create an list but i cant style it by id

  • 0

i was trying to create an list but i cant style it by id or class is there any thing i should know about razor.. Can razor block stylings and how can i give a style to this element that will be filled with razor.

also i wanna make this list as dropdown(i dont wanna make a normal dropdown i wanna use ul element with style). its gonna show only a caption when mouse is over it, it should expand so how can i do it?

@using (Html.BeginForm("Create", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <table>
        <tr>
            <td></td><td></td>
                <td colspan="2">
                    <div class="editor-label">Product</div>
                    <div id="d1" class="editor-field">
                        <input id="iProduct" type="text" />
                        <input id="ProductSub" type="button" style="padding:5px; margin-top:15px;" value="Add New Product" onclick="productsub()"/>
                        @foreach (var Product in (new SelectList((System.Collections.IEnumerable)ViewData["Productlist"], "id", "name")))
                        {
                            <ul id="nanik">
                                <li id="@Product.Value">@Product.Text</li>
                            </ul>
                        }
                    </div>
                </td>

Also if u can tell me if u know how to turn it into dropdown that would be awesome..

  • 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-25T01:05:53+00:00Added an answer on May 25, 2026 at 1:05 am

    I suggest that you open the web page with Google Chrome or Firefox with Firebug installed and use their Inspect element to see why the CSS is not used for styling the list. I’m guessing that some other CSS code has overridden your list styling.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a linked list class in Eclipse but I can't get
I am trying to create an ordered list on IE7 but for some reason
I am trying to create a nice layout for my list items, but my
I have an the following class I'm trying to create a list of with
I'm trying to create a Django app where the user can make a list
I am trying to create a basic navigation bar using an unordered list, but
I'm trying to create a list of tasks that I've read from some text
I am trying to create a list of a certain type. I want to
I am trying to create a list that adds a new row of data
I'm trying to create a list that some of the elements are defined and

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.