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
  1. #1
    jj1
    jj1 is offline
    Senior Member
    Join Date
    Oct 2008
    Posts
    319
    Member #
    17546
    Hi all

    Is there a way of coding:

    1st page viewed on a session (regardless of which page it is) = CSS sheet 1
    all other pages viewed = CSS sheet 2

    I have a site where the landing pages are usually 1 of 7-8 pages, but people COULD land onto other back pages. What I would like to do is to make the first page they land on have a big impressive masthead with large rotating images of previous work but then to make subsequent pages use a very small masthead so people don't have to keep scrolling down.

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    Depends on the programming language used, and no matter how you do it, it won't be perfect (mostly because people have the option not to save cookies/session variables on their machines).

    Here's how you'd do it in ASP:
    Code:
    if Session ("visited") <> "1" then
        Session ("visited") = "1"
        Response.Write "<link href=""first-stylesheet.css"" rel=""stylesheet"" type=""text/css"" />"
    else
        Response.Write "<link href=""subsequent-stylesheet.css"" rel=""stylesheet"" type=""text/css"" />"
    end if
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    jj1
    jj1 is offline
    Senior Member
    Join Date
    Oct 2008
    Posts
    319
    Member #
    17546
    Many thanks TheGAME1264 - actually, I'm interested in html

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    There really isn't a way using pure HTML. You might be able to pull it off using Javascript, but even that would be tricky and wouldn't cover everyone.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    jj1
    jj1 is offline
    Senior Member
    Join Date
    Oct 2008
    Posts
    319
    Member #
    17546
    Many thanks The Game1264.

  7. #6
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    Give each page the huge banner with a little arrow thing on the bottom of the banner.
    If they click that, the banner will switch to the smaller one and stay that way.
    That button would set a PHP SESSION that remains until they close their browser.
    AlphaMare likes this.



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:49 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com