Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6

Thread: using... 2 css

  1. #1
    Senior Member dotcommakers's Avatar
    Join Date
    Oct 2003
    Posts
    527
    Member #
    3342
    Liked
    1 times
    i want to use 2 css in website...

    how can i... well i only that we can call them from db but dont know how to switch them...

    can anybudy help me? :cry:

  2.  

  3. #2
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    137 times
    You have got to explain that better. Do you mean that you wnt to use 2 CSS styles in your website? If so, you only need 1 stylesheet, and just give each style unique names, and then call them from there. A database is not needed at all.
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  4. #3
    Senior Member dotcommakers's Avatar
    Join Date
    Oct 2003
    Posts
    527
    Member #
    3342
    Liked
    1 times
    hummm

    i know that there is only 1 css possilbe in a website...

    but as you know in this forum or every forum we have style right by choosing ourselves we can switch stypelll

    for examples... in website codes

    in place of <td class="main"> we can put <td class="$main">

    and "$main" we called from database and if we choose "style a" $main will be "main" but if we choose "style=b" $main will be "main1"

    but i dont know how to switch style ....

    check out some phpbb forum in top you will see such "style switch option" i would like to have this option for a website

    thabnks

  5. #4
    Senior Member justlivyalife's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham, UK
    Posts
    2,871
    Member #
    2374
    I'm not sure whether this link might be of any use?

    http://www.webdesignforums.net/showt...ht=Stylesheets
    justlivyalife - The future depends on what we do in the present. (Mahatma Gandhi)
    WDF Resources: WDF Rules
    Non-WDF: JavascriptSource | Dynamic Drive | phpBB | HTML-Kit | Winamp | Download Firefox | Morguefile

  6. #5
    Senior Member dotcommakers's Avatar
    Join Date
    Oct 2003
    Posts
    527
    Member #
    3342
    Liked
    1 times
    humm it's in asp


    It's in ASP i need in PHP... but i will try to find ...

    thanks for help


  7. #6
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    If you are building a site's page dynamically, using something like php, then you can generate the link to the css file... so, let's say you have style1.css , style2.css, style3.css etc. in some directory it is simply a case of having something like....

    <link rel="stylesheet" href="<? echo $sheet; ?>" type="test/css" />

    ...at the top of each page. How you determine the value of the $sheet variable depends on how you're creating your site. It may be held in a database, may be passed as a substitution variable, held in a cookee etc. etc. etc.

    Each sheet would have a duplicate set of classes, but the attributes would differ. I would steer well clear of actually coding your class tags as variables... this would be very high maintenance and would demand significantly more coding.

    Hth

    Sean


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:35 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com