Problems adapting CSS

C

Chris Leffer

Hi.

I am having some problems to adapt a stylesheet for an asp.net page.
When I use this .css file on a classic asp page through an include all
works ok, but if I change the include to an usercontrol, asp.net simply
ignores the styles. This include only has a div element, that serves as
the footer of my pages.

If I define the styles inside the main page, the div is correctly
displayed.


These are the css and the contents of the usercontrol:

#footerin{clear: left;background: url(images/bg_footer.jpg) top left
no-repeat;color: #999;font-size: 10px;}
#footerin{padding:5px 15px 15px 50px;width: 850px;margin: 0 0 10px 0;}
#footerin p{padding:0;margin:0;float: left;}
#footerin a{margin:0;padding:0;float: right;color: #999;}
#footerin a:HOVER{text-decoration: underline;}


<div id="footerin">
<p>Copyright &copy; 2005</p>
<a href="infos.aspx">Legal notes</a></div>


Best regards,

Chris Leffer
 
J

Jay Douglas

My suggestion is to look at the HTML asp.net outputs. The ID for your span
tag may have changed. You have the <link rel=""> text in your control, the
path to your stylesheet may be incorrect after asp.net renders the HTML.
 
B

Bruce Barker

you've tied the style to the control name. but when .net control is nested
in another control (say a user control or repeater), the parents control
name is appended to the control id when rendered. thus the controls actual
id does not match what you have in the stylesheet. with asp.net you shoudl
switch to using class names.

-- bruce (sqlwork.com)
 
C

Chris Leffer

Hi Bruce.

I changed my .css and .aspx files to use classes instead of the controls
ids. My footer keeps being ignored by asp.net.

Do you have any other suggestion?

Regards,

Chris Leffer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top