473,396 Members | 1,755 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.

Css Stylesheets and aspx

greetings,

just checking if it is appropriate practice to use css
stylesheets with aspx. If not, what is the recommended
way to format aspx pages? If css is ok do you call the
css same as html?

<link rel="stylesheet" type="text/css" href="MyStyles.css">
Nov 18 '05 #1
5 1563
George wrote:
greetings,

just checking if it is appropriate practice to use css
stylesheets with aspx.
Of course. At the end of the day ASPX just produces (X)HTML.
If not, what is the recommended
way to format aspx pages? If css is ok do you call the
css same as html?

<link rel="stylesheet" type="text/css" href="MyStyles.css">


Sure. But why should each ASPX or HTML file have its own style sheet? Isn't
it more viable to have common styles shared by many web forms or pages?

Cheers,

--
Joerg Jooss
jo*********@gmx.net
Nov 18 '05 #2
Thanks for the reply. Actually, I was planning on having
just one css file with all the styles shared by all the
pages. Just asking, but isn't that how you share common
attributes? If it isn't I'm still in the learning phase
and open to any suggestions. I would like to get in the
correct habits early on.

I noticed in visual studio (2003) that there is the
default styles.css file located in the solution explorer
window. If I were to place MyStyles.css in the same
window (add to the project) would that make accessible to
all the pages such that I wouldn't need this line?

<link rel="stylesheet" type="text/css" href="MyStyles.css">

If so, how would each page know to use MyStyles.css - how
to reference MyStyles.css from the Solution Explorer?

-----Original Message-----
George wrote:
greetings,

just checking if it is appropriate practice to use css
stylesheets with aspx.
Of course. At the end of the day ASPX just produces (X)

HTML.
If not, what is the recommended
way to format aspx pages? If css is ok do you call the
css same as html?

<link rel="stylesheet" type="text/css"
href="MyStyles.css">
Sure. But why should each ASPX or HTML file have its own style sheet? Isn'tit more viable to have common styles shared by many web forms or pages?
Cheers,

--
Joerg Jooss
jo*********@gmx.net
.

Nov 18 '05 #3
Well, here is what I will try, unless someone suggests
otherwise:

Add the css file to the project, and then reference the
Css class for each control, object

-----Original Message-----
Thanks for the reply. Actually, I was planning on having
just one css file with all the styles shared by all the
pages. Just asking, but isn't that how you share common
attributes? If it isn't I'm still in the learning phase
and open to any suggestions. I would like to get in the
correct habits early on.

I noticed in visual studio (2003) that there is the
default styles.css file located in the solution explorer
window. If I were to place MyStyles.css in the same
window (add to the project) would that make accessible to
all the pages such that I wouldn't need this line?

<link rel="stylesheet" type="text/css" href="MyStyles.css">
If so, how would each page know to use MyStyles.css - how
to reference MyStyles.css from the Solution Explorer?

-----Original Message-----
George wrote:
greetings,

just checking if it is appropriate practice to use css
stylesheets with aspx.


Of course. At the end of the day ASPX just produces (X)

HTML.
If not, what is the recommended
way to format aspx pages? If css is ok do you call the
css same as html?

<link rel="stylesheet" type="text/css"

href="MyStyles.css">

Sure. But why should each ASPX or HTML file have its own

style sheet? Isn't
it more viable to have common styles shared by many web

forms or pages?

Cheers,

--
Joerg Jooss
jo*********@gmx.net
.

.

Nov 18 '05 #4
George wrote:
Thanks for the reply. Actually, I was planning on having
just one css file with all the styles shared by all the
pages. Just asking, but isn't that how you share common
attributes? If it isn't I'm still in the learning phase
and open to any suggestions. I would like to get in the
correct habits early on.

I noticed in visual studio (2003) that there is the
default styles.css file located in the solution explorer
window. If I were to place MyStyles.css in the same
window (add to the project) would that make accessible to
all the pages such that I wouldn't need this line?

<link rel="stylesheet" type="text/css" href="MyStyles.css">

If so, how would each page know to use MyStyles.css - how
to reference MyStyles.css from the Solution Explorer?


Just because some file is in project doesn't mean it's accessible at run
time. You have to have a <link /> tag for each of your CSS files.

Cheers,

--
Joerg Jooss
jo*********@gmx.net
Nov 18 '05 #5
Thanks. That did the trick! I created an extern .css
file and added the <link> tag to the <head> tag, and now I
have all these great attributes to play with :).

-----Original Message-----
George wrote:
Thanks for the reply. Actually, I was planning on having just one css file with all the styles shared by all the
pages. Just asking, but isn't that how you share common
attributes? If it isn't I'm still in the learning phase
and open to any suggestions. I would like to get in the
correct habits early on.

I noticed in visual studio (2003) that there is the
default styles.css file located in the solution explorer
window. If I were to place MyStyles.css in the same
window (add to the project) would that make accessible to all the pages such that I wouldn't need this line?

<link rel="stylesheet" type="text/css" href="MyStyles.css">
If so, how would each page know to use MyStyles.css - how to reference MyStyles.css from the Solution Explorer?
Just because some file is in project doesn't mean it's

accessible at runtime. You have to have a <link /> tag for each of your CSS files.
Cheers,

--
Joerg Jooss
jo*********@gmx.net
.

Nov 18 '05 #6

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

Similar topics

3
by: jason baumunk | last post by:
I author applications in php which use external stylesheets. When viewed through ie 6, netscape 6, et al. occassionally the stylesheets will not load or be applied. Has anybody encountered this...
6
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: twice a week (mondays and thursdays) Last-modified: March 10, 2001 Version: 1.95 URL: http://css.nu/faq/ciwas-mFAQ.html Maintainer:...
2
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: once a week Last-modified: 2004-07-26 Version: 2.00 URL: <http://css.nu/faq/ciwas-mFAQ.html> Maintainer: Jan Roland Eriksson...
0
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: once a week Last-modified: 2004-07-26 Version: 2.00 URL: <http://css.nu/faq/ciwas-mFAQ.html> Maintainer: Jan Roland Eriksson...
0
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: once a week Last-modified: 2004-07-26 Version: 2.00 URL: <http://css.nu/faq/ciwas-mFAQ.html> Maintainer: Jan Roland Eriksson...
8
by: mscertified | last post by:
I have two stylesheet files, one is a standard file and one a custon file. They have no classnames in common. How do I specify that my page use both stylesheets? I tried Help and as usual could...
2
by: mark4asp | last post by:
Can I force the client to stop caching old stylesheets and javascript? In my dynamic web-site, I need to force the client to stop caching old versions of my stylesheets and javascript. Can I do...
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
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.