SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2001
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adding email to css?

    Im working on a newsscript for my page. When i upload a news artical, i want it to automatically do a link so people can email me. But i dont know how to do it..

    Right now i am linking to a *.css file.

    And for example, on my script ill put down
    PHP Code:
    <span class=email>EricHQ2</span
    What do i put in the css file? I know i have to do something like
    PHP Code:
    span.email { } 
    but that all i know.
    signature

  2. #2
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could use an <a class="mail" href="mailto:me@foo.com">EricHQ2</a>

    Then in your .css file apply whatever style you what to the class="mail" like so:

    .mail
    {
    color: #ffccff;
    font-weight:bold;
    }

    with <a> tags you can also use psuedo elements like :hover, :active etc.

    .mail:hover
    {
    text-decoration:none;
    }

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2001
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Err.. I was kinda hoping for a way so i didnt have to type "<a href=mailto:...." all the time. Just something like "<___ class=email>richq2</___> and it would add the "<a href=..." part for me.
    Last edited by EricHQ2; Oct 16, 2001 at 00:33.
    signature

  4. #4
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OH...I get it.

    You could use an include, but that probably wouldn't save you much typing though.

  5. #5
    SitePoint Addict
    Join Date
    Jul 2001
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    CSS will format the link, but it will not create a link.

  6. #6
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're pulling from database then all you have to do is create your script so that it puts the HREF around your name, something like this:

    Name: Your name
    Date: some date
    News: THis would be where you put your news.

    In the script, you would simply put the HREF tag around name and pull the email address of the person posting from the database.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


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
  •