Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem with CSS

Problem with CSS

Scheduled Pinned Locked Moved ASP.NET
helptutorialjavascriptcsswpf
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AndyASPVB
    wrote on last edited by
    #1

    Hi I have problem with my CSS where are all styles are saved to CSS file, which I link to in my master page. On my web content page, which inherits my master page, I have a number of user controls on my content page. However, the problem I have is that my tags are not applying the CSS, and I don't understand why! For example, I have a number of div tags which have display property set on them to block. Using Javascript I then change to the setting to none in order to show and hide the div tag. Adding an alert message box, and checking the div tag, the CSS property is not set then though I have applied the style via the class property of the tag. When I apply the CSS using the style proprty everything works! This is not how I want to set my CSS because my coding standard is to use the CSS file and set it via the class property. Can some explain to me why this is happening and how to fix it?

    P 1 Reply Last reply
    0
    • A AndyASPVB

      Hi I have problem with my CSS where are all styles are saved to CSS file, which I link to in my master page. On my web content page, which inherits my master page, I have a number of user controls on my content page. However, the problem I have is that my tags are not applying the CSS, and I don't understand why! For example, I have a number of div tags which have display property set on them to block. Using Javascript I then change to the setting to none in order to show and hide the div tag. Adding an alert message box, and checking the div tag, the CSS property is not set then though I have applied the style via the class property of the tag. When I apply the CSS using the style proprty everything works! This is not how I want to set my CSS because my coding standard is to use the CSS file and set it via the class property. Can some explain to me why this is happening and how to fix it?

      P Offline
      P Offline
      PSK_
      wrote on last edited by
      #2

      There is a similar post regarding the css, that might help. http://www.codeproject.com/Messages/3498691/Re-css-file-not-getting-applied-by-asp-net-page.aspx[^]

      WWW, WCF, WWF, WPF, WFC .... WTF

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups