SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Feb 2012
    Location
    Kiwi in Bangkok
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help please, I am trying to call 2 css class to this HTML

    I have this html line, it had one css class, but I wish to add the 2nd css class to the word Join Here!

    can I do it ?

    <p class="latestMembersText">Lots of new singles are joining every day...<br /> You could be one of them - </p> <p class="JoinHereTextArea"><a href="signup-stepone.php">Join Here!</a></p>

    all help greatly appreciated

  2. #2
    SitePoint Addict
    Join Date
    Feb 2012
    Location
    Kiwi in Bangkok
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I alos would like this image ti live link to a php file

    Could any one help me by combining these codes please, I tried yet no joy

    I would the like the image when clicked on to open the php page

    <img class="sideAdvert" src="images/join-free-advert.png" alt="join-free-advert" width="300" height="220"/>

    <a href="signup-stepone.php">

    All help appreciated

  3. #3
    SitePoint Member c0dingL!fe's Avatar
    Join Date
    Sep 2013
    Location
    Essex
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can add as many classes to a html element as you need, you just separate the class names with a space. Let's say you have 2 classes:
    Code:
    .coloring
    {
            color: #ff0000;
            text-decoration: underline;
    }
    .yellow_bg
    {
           background: yellow;
    }
    You could add these to a single HTML like this:

    Code:
    <p class="coloring yellow_bg">This is some text</p>
    To make the script run when the image is clicked you need to put your image WITHIN the <a>nchor tag.

    For example:

    Code:
    <a href="signup-stepone.php">
             <img class="sideAdvert" src="images/join-free-advert.png" alt="join-free-advert" width="300" height="220" />
    </a>
    Kind regards,

    c0dingL!fe

  4. #4
    SitePoint Addict
    Join Date
    Feb 2012
    Location
    Kiwi in Bangkok
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello c0dingL!fe, thank you for your answers, yes great I understand, and will implement those codes now,

    Thank you again, and best wishes

  5. #5
    SitePoint Member c0dingL!fe's Avatar
    Join Date
    Sep 2013
    Location
    Essex
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good morning Ray,

    No problem Glad to help.

    Regards,

    c


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
  •