473,785 Members | 2,481 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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{paddi ng:5px 15px 15px 50px;width: 850px;margin: 0 0 10px 0;}
#footerin p{padding:0;mar gin:0;float: left;}
#footerin a{margin:0;padd ing:0;float: right;color: #999;}
#footerin a:HOVER{text-decoration: underline;}
<div id="footerin">
<p>Copyright &copy; 2005</p>
<a href="infos.asp x">Legal notes</a></div>
Best regards,

Chris Leffer
*** Sent via Developersdex http://www.developersdex.com ***
Nov 23 '05 #1
3 1269
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.co m> wrote in message
news:Ob******** ******@TK2MSFTN GP11.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{paddi ng:5px 15px 15px 50px;width: 850px;margin: 0 0 10px 0;}
#footerin p{padding:0;mar gin:0;float: left;}
#footerin a{margin:0;padd ing:0;float: right;color: #999;}
#footerin a:HOVER{text-decoration: underline;}
<div id="footerin">
<p>Copyright &copy; 2005</p>
<a href="infos.asp x">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.co m> wrote in message
news:Ob******** ******@TK2MSFTN GP11.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{paddi ng:5px 15px 15px 50px;width: 850px;margin: 0 0 10px 0;}
#footerin p{padding:0;mar gin:0;float: left;}
#footerin a{margin:0;padd ing:0;float: right;color: #999;}
#footerin a:HOVER{text-decoration: underline;}
<div id="footerin">
<p>Copyright &copy; 2005</p>
<a href="infos.asp x">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
2662
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 for the sidebar navigation, The second cell is the main content and the third (in the second row) for the page footer. I cannot figure out why on some pages a gap opens up on the side of image at the top of the navigational side bar. It appears...
14
2326
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 going to use .Net......I highly recommend signing up for the free KBAlertz newsletter at http://www.kbalertz.com/default.aspx. Looking at all of the errors and quirks sometimes makes me wonder if this thing is really ready for prime time.
12
2263
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: http://www.celticbear.com/weblog/ looks fine in Firefox and Opera, but in IE6, the main body block positions itself below the left menu bar. I've W3C validated the XML Schema, HTML, and CSS and fixed a couple of errors and all three now give me a "valid"...
16
2219
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 has been working flawlessly for about 2 years. I am now at a point where these databases need to be converted to Access 2003. I think I read somewhere on this forum that the newer versions of Access are not as tolerant to multiple users...
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6739
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.