Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 16th, 2004, 08:24 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default Easy Html with Aspx question

I am pretty familar with CSS but I am stuck.
Until now I didn't have any problems with CSS wether I use straight html or aspx page but I got this working in straight html page but not when I apply it to aspx.
I only included the important stuff:


<html>
<head>
<link href="style.css" rel="Stylesheet" type="text/css">
</head>
<body>
<a href="www.event.aspx" class="sigslinks">sdhdthetryhedy</a>
</body>
</html>

with style.css:
A.SigsLinks :link
{ font-size: .6em;
text-decoration: none;
color:blue;
}


But when I put this in aspx file it doesn't apply:
lblsigs.Text = "<table><tr><td><a href='www.event.aspx' class='sigslinks'>Click Here</a></tr></td></table>"

What is wrong?



 
Old August 16th, 2004, 10:41 PM
Registered User
 
Join Date: Apr 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Douglas Tan Send a message via MSN to Douglas Tan
Default

lblsigs.Text = "<table><tr><td><a href='www.event.aspx' class='sigslinks'>Click Here</a></td></tr></table>"

Your HTML is a bit wrong, this should fix it

 
Old August 16th, 2004, 10:48 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello
I fixed that minor problem but the css still doesn't apply.
HELP PLEASE

 
Old August 17th, 2004, 09:11 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

I guess my first question would be:

Why are you putting a table into the text property of a label?

-----------------------------------

My guess is that your problem lies with this line:

<link href="style.css" rel="Stylesheet" type="text/css">

If you are using the default style sheet that VS builds, it is named "styles.css".

I tried replicating your code and that seemed to be the only thing that I saw regarding the CSS.

J
 
Old August 17th, 2004, 07:05 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for your replies but these suggestion don't answer my question.
Style.css is correct.

THE REAL QUESTION IS USING style for A links in CSSWHEN I USE CLASS INSIDE A HREF TAG IT DOESN'T WORK IN ASPX.
This code works in .HTML extension page fine but when the same code is used in .ASPX page all other Css shows but the A.SigsLink :link



 
Old August 18th, 2004, 12:09 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

No need to shout.

Maybe the ASPX pages uses a different doctype so the behavior is different?

Anyway, CSS selectors are case sensitive; so make sure your <a> tag uses SigsLinks as the class instead of sigslinks as per your example.
Maybe the HTML pages uses the correct capitalization?

That's the only reason I can think of for this behavior. As far as the browser is concerned, there is no difference between an ASPX page and an HTML page, so the problem must be somewhere else.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old August 19th, 2004, 04:11 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Got it. Thanks






Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy Html CSS question bekim All Other Wrox Books 3 August 24th, 2009 02:41 AM
hopefully an easy question davehodges Access 1 November 7th, 2007 06:36 AM
Easy Question hexOffender Beginning PHP 2 July 12th, 2006 05:03 AM
Easy Question - I think gmoney060 Classic ASP Basics 3 November 2nd, 2004 06:54 PM
easy question khautinh C# 4 August 6th, 2003 01:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.