473,651 Members | 2,485 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Style sheet - two textboxes - different styles

Hi

I have another style sheet question:

We effectively have a page that has two text boxes on it.
We would like one text box to be in one style and the other text box to be
in another style.
The problem is we would like the user to be able to control the styles using
style sheets.
Is there anyway around this without hard coding the styles into the page?

Thanks in advance

Chris


Nov 18 '05 #1
3 1782
Do you mean a user who has access to the server hosting your application?
Then you can use an external stylesheet, assign classes to the textboxes and
define css rules in the external stylesheet for these classes.

If you mean a client-side user, you can provide special gui and write
javascripts for setting styles and keep the styles in cookies. A big job.

Eliyahu

"Chris" <cw@community.n ospam> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi

I have another style sheet question:

We effectively have a page that has two text boxes on it.
We would like one text box to be in one style and the other text box to be
in another style.
The problem is we would like the user to be able to control the styles using style sheets.
Is there anyway around this without hard coding the styles into the page?

Thanks in advance

Chris

Nov 18 '05 #2
Chris, here's one way I've done it: have a single external style sheet which
holds your defaults, then override per page as necessary with per-user values
from your database. Because styles "cascade," if there's something
page-specific it will take precedence over the external sheet. To override
per page, easiest is to add a literal control between <head></head>, then add
your <style></style> to it at run-time. If all your pages inherit from a
single page, you only have to do this once, else you have to do it for each
page where you want the new styles.

hth,

Bill

P.S. You can also add id= and runat= to the <head> tag directly, but as has
been documented out here a bunch of times the runat= disappears at random
when you toggle to/from design mode.

"Chris" wrote:
Hi

I have another style sheet question:

We effectively have a page that has two text boxes on it.
We would like one text box to be in one style and the other text box to be
in another style.
The problem is we would like the user to be able to control the styles using
style sheets.
Is there anyway around this without hard coding the styles into the page?

Thanks in advance

Chris


Nov 18 '05 #3
Thanks for the help guys.

I did Eliyahu's suggestion in the end.

Chris

"Chris" <cw@community.n ospam> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi

I have another style sheet question:

We effectively have a page that has two text boxes on it.
We would like one text box to be in one style and the other text box to be
in another style.
The problem is we would like the user to be able to control the styles
using style sheets.
Is there anyway around this without hard coding the styles into the page?

Thanks in advance

Chris

Nov 18 '05 #4

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

Similar topics

2
2007
by: Mark | last post by:
Hi - I want to allow users of an intranet application, to select their own colours etc. So I have a tbale in my database, which has fields called bgcolour, fontcolour etc. As I want all pages to get the users colours, I have an includes file at the top of each page: <!--#include file="userconfig.asp" --> This is:
6
3663
by: Mark Cunningham | last post by:
I am curious if there is something that would be considered a proper method for locating small (three to four items) amounts of page specific styling. Or does it really matter in the great scheme of things? I have a linked style sheet that covers everything I want to do globally. What should be done if I want to change and/or add a couple of divs and paragraphs on a specific page and the style applied is specific to that one page? ...
2
2244
by: Markus Ernst | last post by:
Hi I build a small content management system. I use different external stylesheets for the admin section and the frontend, called admin.css and frontend.css. Now I would like to preview some frontend stuff in the admin section. Is there a syntax for accessing a style from a different style sheet? For example:
5
1926
by: BenOne© | last post by:
Hi all, If I want to have many divs with different padding, border, and colour properties, should I just set those styles in line, ie: <DIV style"..."> </DIV> or should I define all the divs in a separate style sheet and link to it in the header of my doc, ie: <!--
4
1828
by: Wintersrush | last post by:
I am working on a website that is using a Cascading Style Sheet. I've created the primary webpages and .css page. The format is the same throughout the entire website EXCEPT the color of the headings and hyperlinks. I need to make each site have a different color of those items. How do I make the changes to each page, but keep the same .CSS? Any feedback would be GREATLY appreciated!
2
1381
by: Matthew McDermott | last post by:
Hi, I am working on "reskinning" an application that uses style sheets. I have been editing the default stylesheets by adding my alterations to the bottom of the .css files. I was wondering if there was a way to add an "include" at the bottom of the existing stylesheets to point to another stylesheet, this would prevent my changes from being overwritten if the product upgrade overwrites the
5
1691
by: David C | last post by:
I am not fully understanding how to refer to another file in the aspx page. There is one style sheet which I need to refer to and it is in the root directory <LINK href="styles.css" type="text/css" rel="stylesheet"> So how to I refer to that from aspx pages in various sub-directories? It works if I use relative paths (../styles.css), but not if you are
2
1993
by: Hallvard B Furuseth | last post by:
Are there any guidelines or conventions for how to organize the preferred and alternate style sheets for a site, sheets for different media, and what titles to give them in the <link rel="(alternate )stylesheet" title="..." ... /> element? For example: Are there user agents that have problems with characters like space or apostrophe in the title? Are there user agents that can be configured
4
5630
Frinavale
by: Frinavale | last post by:
So a while ago I created a Tab Strip Control (before the AjaxToolkit had theirs otherwise I would have probably just used theirs). When I looked at the AjaxToolkit control to see how they got around this problem I discovered that they're using Animations. I don't want to bloat my control with the Ajaxtoolkit's Animation stuff though. I guess I should tell you what the problem is. I have a TabStrip custom control. It's a Table that has...
0
8352
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8579
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...
1
6158
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
5612
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();...
0
4283
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1587
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.