Style sheet - two textboxes - different styles

Discussion in 'ASP .Net' started by Chris, Oct 26, 2004.

  1. Chris

    Chris Guest

    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
     
    Chris, Oct 26, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:%...
    > 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
    >
    >
    >
    >
     
    Eliyahu Goldin, Oct 26, 2004
    #2
    1. Advertising

  3. 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
    >
    >
    >
    >
    >
     
    =?Utf-8?B?QmlsbCBCb3Jn?=, Oct 26, 2004
    #3
  4. Chris

    Chris Guest

    Thanks for the help guys.

    I did Eliyahu's suggestion in the end.



    Chris



    "Chris" <> wrote in message
    news:%...
    > 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
    >
    >
    >
    >
     
    Chris, Oct 27, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cmonsta
    Replies:
    1
    Views:
    640
    Patrick Olurotimi Ige
    Mar 8, 2005
  2. Replies:
    0
    Views:
    563
  3. Replies:
    1
    Views:
    415
    David Wier
    Sep 19, 2006
  4. Jeff
    Replies:
    2
    Views:
    5,167
  5. Ken Varn
    Replies:
    0
    Views:
    526
    Ken Varn
    Apr 26, 2004
Loading...

Share This Page