473,396 Members | 1,866 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,396 software developers and data experts.

Cascading Style Sheet

I am trying to work with cascading style sheet in VB.NET. I have never
used CSS. I see that the TextBox has a property of "CssClass" and I was
wondering how to use it. I placed the following in the <HEAD> section

<style>
TxtStyle1 { TEXT-ALIGN: right }
</style>

For a textbox, I set the "CssClass="TxtStyle1" but it had not effect. How
can I properly use this?
Nov 18 '05 #1
3 947
Jim,

You are very close add a "." before the class name.

<style>
.TxtStyle1 { TEXT-ALIGN: right }
</style>

Now it should work.

Regards,
RedEye
"Jim Heavey" <Ji*******@nospam.com> wrote in message
news:Xn*********************************@207.46.24 8.16...
I am trying to work with cascading style sheet in VB.NET. I have never
used CSS. I see that the TextBox has a property of "CssClass" and I was
wondering how to use it. I placed the following in the <HEAD> section

<style>
TxtStyle1 { TEXT-ALIGN: right }
</style>

For a textbox, I set the "CssClass="TxtStyle1" but it had not effect. How
can I properly use this?

Nov 18 '05 #2
"RedEye" <re*******@hotmail.com> wrote in
news:u7*************@tk2msftngp13.phx.gbl:
Jim,

You are very close add a "." before the class name.

<style>
.TxtStyle1 { TEXT-ALIGN: right }
</style>

Now it should work.

Regards,
RedEye


Thanks.. It does indeed now work.

So what is the deal with requiring a "." in front of the name when you
define it, but not requiring a "." when you specify the
"CssClass="TxtStyle1"? Maybe it does require it but it is just very
forgiving?
Nov 18 '05 #3
When writing a custom class inside your <style> tags the "." means that it's
a custom class and that you're not just defining, say the <BODY> tag. When
you set the class the item, it already knows it's a custom class else you
would not have to specify it.

jM

"Jim Heavey" <Ji*******@nospam.com> wrote in message
news:Xn*********************************@207.46.24 8.16...
"RedEye" <re*******@hotmail.com> wrote in
news:u7*************@tk2msftngp13.phx.gbl:
Jim,

You are very close add a "." before the class name.

<style>
.TxtStyle1 { TEXT-ALIGN: right }
</style>

Now it should work.

Regards,
RedEye


Thanks.. It does indeed now work.

So what is the deal with requiring a "." in front of the name when you
define it, but not requiring a "." when you specify the
"CssClass="TxtStyle1"? Maybe it does require it but it is just very
forgiving?

Nov 18 '05 #4

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

Similar topics

31
by: Axel Dahmen | last post by:
I try to combine properties of several classes. This is done by assigning a space separated list of class definitions to an element. However, IE shows a kind of preference when choosing the right...
2
by: pp | last post by:
What would you say about a smart script that would transform really 'cascading' style sheet into appropriate CSS structures. When coding css by hand, most often you are forced to write the...
2
by: Herb Stull | last post by:
I'm trying to give users a choice of the visual interface used in my ASP.NET application using Cascading Style Sheets. Ideally I'd like to offer them several choices for backgrounds, fonts, etc....
1
by: Fred Nelson | last post by:
Hi: I have a VB.NET web application that has been running just fine for several months without any cascading style sheets. Suddenly several users have had problems with the layout of the...
4
by: Fred Nelson | last post by:
Hi: I have a VB.NET web application that has been running just fine for several months without any cascading style sheets. Suddenly several users have had problems with the layout of the...
10
by: Radium | last post by:
Cascading Style Sheet is hazardous to your privacy. It allows others on the internet to see your monitor and files. It allows them to copy images on your monitor to their computers. It also allows...
9
by: Radium | last post by:
Cascading Style Sheet is an extreme hazard to your privacy. It allows others on the internet to see your monitor and files. It allows them to copy images on your monitor to their computers. It...
7
by: Green Xenon [Radium] | last post by:
Cascading Style Sheet is such a hazard to your privacy. It allows others on the internet to see your monitor and files. It allows them to copy images on your monitor to their computers. It also...
2
by: greenMark | last post by:
Hi All, I'm relatively new to ASP.NET and Visual Web Developer 2008. I'm using a Master page with one content place holder. There is a Cascading Style Sheet file which is being refered by the...
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:
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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...
0
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...
0
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,...

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.