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 4 of 4
  1. #1
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    Hi,
    I was wondering if anyone knows of a way to specify the location of a link through css rather than html. I am thinking something like
    Code:
    a { link: url('somelink.html') }
    ...
    I can't seem to find anything on this. Does anyone know?
    Thanks,
    Heather
    choosy developers choose gif!
    website | paintings | blog

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Not me.. the CSS is obviously loaded on .. load and therefore would not be remembered when the link is clicked..

    And url() is normally used for background..

    I am going to keep looking though, interesting idea.

  4. #3
    Senior Member audiofreak9's Avatar
    Join Date
    Apr 2005
    Location
    NJ
    Posts
    339
    Member #
    9584
    No it is not possible. The most you can do to a hyerlink with CSS is add to the target text of the hyperlink.
    <a href...>TARGET TEXT</a>
    Example: if you have the following in your HTML:
    Code:
    <a href="http://www.webdesignforums.net">www.webdesignforums.net</a>
    and included in your CSS is:
    Code:
    a:after {content: " (" attr(href) ") "; }
    then you would get the following displayed:
    Code:
    (www.webdesignforums.net)
    You can add almost anything before and after the target text. This is typically used with alternate media type CSS (print, handheld, etc.).

  5. #4
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Remember, CSS is used to define the style of a page, not its functionality. A link URL would be defined by the page's functionality, not its purpose.

    Although it would be nice if the "src" element of an img element could be abstracted into CSS.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!


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
  •  

Search tags for this page

change link location css
,
change link location in css
,
css change a link location
,

css change link location

,
css link location
,
css links to location on page
,
how to change link destination css
,
specify link in css
,
specify link of css
,
specify links in css
Click on a term to search for related topics.
All times are GMT -6. The time now is 02:50 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com