473,387 Members | 1,529 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Problems adapting CSS

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
*** Sent via Developersdex http://www.developersdex.com ***
Nov 23 '05 #1
3 1254
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.


--
Jay Douglas
http://www.jaydouglas.com
"Chris Leffer" <ch****@wank.com> wrote in message
news:Ob**************@TK2MSFTNGP11.phx.gbl...
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
*** Sent via Developersdex http://www.developersdex.com ***

Nov 23 '05 #2
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)


"Chris Leffer" <ch****@wank.com> wrote in message
news:Ob**************@TK2MSFTNGP11.phx.gbl...
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
*** Sent via Developersdex http://www.developersdex.com ***

Nov 23 '05 #3
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

*** Sent via Developersdex http://www.developersdex.com ***

Nov 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: FDYocum | last post by:
I am having problems with a Web site that I've designed and I am grinding my teeth in frustration. The pages are built around a table with four cells. The first cell is spanned two rows and is...
14
by: Jim Hubbard | last post by:
Are you up to speed on the difficulties in using the 1.1 .Net framework? Not if you are unaware of the 1,596 issues listed at KBAlertz (http://www.kbalertz.com/technology_3.aspx). If you are...
12
by: news | last post by:
I'm having a heck of a time, and I'm hoping someone can take a quick look and see if they can recognize what might be the problem and point me the right direction. My blog page:...
16
by: Wayne Aprato | last post by:
I have several Access 97 databases which are split into front end and back end running off a server. The front end mde is shared by 2 or 3 - absolute maximum of 6 concurrent users. This scenario...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.