Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how can i apply external css rule to a <div runat="server">?

Posted on 2008-06-17
6
Medium Priority
?
964 Views
Last Modified: 2011-08-18
i've a <div> element on a .aspx page with some css rules defined in external .css file. It is working fine, but as soon as i add an attribute runat="server" inside <div>, the external css rule is not called. What could be the problem?
0
Comment
Question by:AkhilBMin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 4

Expert Comment

by:sajay_j
ID: 21810492
Could you please send the codes within page or URL?
0
 
LVL 1

Author Comment

by:AkhilBMin
ID: 21810648

<!-- HTML Page Code -->
<div id="divInvalidPwd" runat="server" visible="false">
</div
---------------------------------------------------
/* CSS */
#divInvalidPwd{position: relative; background-color: #FDFAF1; border: solid 1px #DAD9DA; height: 50px; width: 303px;}

Open in new window

0
 
LVL 4

Expert Comment

by:sajay_j
ID: 21810730
Apply the codes as below. Hope it would work..I am not getting any error out of it.
<!---------------------------------------------------*/
/* CSS -->
<style>
#divInvalidPwd{position: relative; background-color: #FDFAF1; border: solid 1px #DAD9DA; height: 50px; width: 303px;}
</style>
 
<!-- HTML Page Code -->
<div id="divInvalidPwd" runat="server" visible="false">
</div>

Open in new window

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:sajay_j
ID: 21810736
<div id="divInvalidPwd" runat="server" visible="visible">
</div>
0
 
LVL 1

Author Comment

by:AkhilBMin
ID: 21811033
i actually need to put the css rulesets in an external .css file.
0
 
LVL 1

Accepted Solution

by:
AkhilBMin earned 0 total points
ID: 21819383
using CLASS selector solved the problem, rather using ID selector !
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question