Results 1 to 7 of 7

Thread: how to do link always coloured for particular page?

  1. #1
    Join Date
    Jan 2006
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question how to do link always coloured for particular page?

    1. question: I would like to do that when user clicks on link it will be constant with particular colour. How to do it because there is removed A:active as I do not want to show all the time coloured if user clicks on link. It should be just in case user is on particular page.
    2. question:
    I would like to give this menu separate css script name like topmenu. How to do it that all css will be not for all page?

    I'm new to this. Need help

    PHP Code:
    <head>
      <
    title></title>
      <
    style type="text/css">

    A:link
    {
    font-family"Helvetica Neue Light"HelveticaArialsans-serif;
    text-decoration:none;
    background-color:#000000;
    color:#ffffff;
    text-align:center;
    font-size:16px;
    font-weight:bold;
    font-style:normal;
    text-decoration:none;
    }

    A:visited
    {
    font-family"Helvetica Neue Light"HelveticaArialsans-serif;
    text-decoration:none;
    background-color:#000000;
    color:#ff6600;
    text-align:center;
    font-size:16px;
    font-weight:bold;
    font-style:normal;
    text-decoration:none;

    }
    /*
    A:active
    {
    font-family: "Helvetica Neue Light", Helvetica, Arial, sans-serif;
    text-decoration:none;
    background-color:#000000;
    color:#ffffff;
    text-align:center;
    font-size:16px;
    font-weight:bold;
    font-style:normal;
    text-decoration:none;
    }
    */
    A:hover
    {
    font-family"Helvetica Neue Light"HelveticaArialsans-serif;
    text-decoration:none;
    background-color:#000000;
    color:#ff6600;
    text-align:center;
    font-size:16px;
    font-weight:bold;
    font-style:normal;
    text-decoration:none;
    }
    -->
    </
    style>

      </
    style>
    </
    head>

    <
    body>


    <
    table border="0" cellpadding="0" cellspacing="0" width="480">
    <
    tr>

    <
    td align="middle"  width="120">
    <
    A href="link.htm">Link</A></td>

    <
    td align="middle"  width="120">
    <
    A href="link1.htm">Link1</A></td>

    <
    td align="middle"  width="120">
    <
    A href="link2.htm">Link2</A></td>

    <
    td align="middle"  width="120">
    <
    A href="link3.htm">Link3</A></td>
    </
    tr>
    </
    table>

    </
    body>

    </
    html

  2. #2
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    Q1: if I understand well:
    It should be just in case user is on particular page
    then you could just change the color of that link using <font>. Then people know when they are on a certain page because that link is colored. Css has nothing to do with it.
    Q2: again, if I understand well:
    How to do it that all css will be not for all page
    Best you can do is place the css that is applicated to all pages in a separate css file, referring to it like this:
    [CODE]<link href="stylesheet.css" rel="stylesheet" type="text/css">/CODE]
    Place the effects you wish to use on specific pages only like in the example above, in the head.
    I have problems really understanding what you mean, but I hope this helps.

  3. #3
    Join Date
    Jan 2006
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Q1: I have problem that header is seen on all pages. So it can not be solution with font because it is seen on all pages as included file.


    Q2:
    I have done css for all pages like:
    [code]<link href="stylesheet.css" rel="stylesheet" type="text/css">/CODE]

    but there is problem that this menu buttons with css should have their own defined names like ID, div...How to do it? Need help as I'm new to this.

  4. #4
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    Can you place a link to have a closer look, please ?

  5. #5
    Join Date
    Jan 2006
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    do not understand. There is all code. I have not on server as it is not solved issue. Please send me question if I wasnot clear. Sorry not to show you web site.

  6. #6
    Join Date
    Oct 2005
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I would like to install a menu through css with link tabs like the menu shown here:http://www.dynamicdrive.com/style/cs...color-tabs-ii/

    My question is. How do I make it so the link tab belonging to the current page gets highlighted. I don't want to manually put the menu code section on each of the pages heads and manually specify id="current" on each page.

    Is there a java script or something that will allow me to put the same menu tags on each of the pages head and when a visitor click on a particular page, the script automatically change the link tab linking to that page to a different color.

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    then you could just change the color of that link using <font>. Then people know when they are on a certain page because that link is colored. Css has nothing to do with it.
    Except that <font> is obsolete presentational markup.

    toplisek, either include a special CSS file for that page or give the page's <body> an ID and identify it that way.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •