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.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
  1. #1
    Member
    Join Date
    Sep 2006
    Posts
    77
    Member #
    14004
    Hello,
    Could anyone tell me please how do I change the appearance of all links in this sequence?

    <td width="500" align="left"><a href="ViewCart.php?CartID={cart_id}" class="cartname">{name}</a><br>{Count}{subs}</td>

    This code is part of the shopping cart script saved as html template. The template can be fully customised, giving the fact that all data is coming from another shop.php file.
    {Count}{subs} display all links to different items; visitor clicks on any of them and is redirected to a specific item page.
    My problem is: all these links are too small, with very bad, not wanted, default colour and hover colour. Iíve already changed {cart_id} appearance of the link by using class attribute (class="cartname"). Changing the appearance of other two {Count}{subs} wouldnít work with class, neither with font attributes. Maybe I didn't do it the right way, or maybe this is something I need to change in shop.php ?

    Thank you very much for helping me.

  2.  

  3. #2
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    I'm sure that the curly brackets are part of a templating system. Shop.php should also only be responsible of inserting data into those tags and writting those tags several times in the real page. What you should do is modify the "cartname" class into the td instead of the anchor. This way it's influence should be on the entire area. Be weary what IE6 will accept for :hover, so use ".cartname a:hover" for the hover effect.
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  4. #3
    Member
    Join Date
    Sep 2006
    Posts
    77
    Member #
    14004
    If I have to modify shop.php to make this links appear different way then Iím lost. The script is 1000 lines large and too complicated for me.

    The part which is in the <a href=Ö. > with class attribute displays different categories. All these links/categories are displayed as I wanted (class="cartname").Also I wanted them to be displayed in different way than all items from {Count}{subs}

    The other two {Count}{subs} display pages with items. Giving class attribute to the whole <td> (beginning of above code) is destroying even categories display- everything comes as default (small, blue).

    Creating a new <td>, with desired class attribute, only for {Count}{subs} didnít work either.

    Anyone could send me a sample of what else could I try?

    Thanks a lot

  5. #4
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    Ok, then which is it that you want to style then? Just the text within the link and a hover effect?
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  6. #5
    Member
    Join Date
    Sep 2006
    Posts
    77
    Member #
    14004
    Hi Steax,
    Thank you for your answer.
    Just the appearance of the link=text. Even if it's not changing when mouse is over (hover effect) it doesn't matter. I just wanted to change their colour and size.

  7. #6
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    Then use the class "cartname" in CSS. Like
    Code:
    a.cartname{
      color: #fff;
      font-decoration: none;
    }
    Will make the text white and remove underlines.
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  8. #7
    Member
    Join Date
    Sep 2006
    Posts
    77
    Member #
    14004
    I tired this way, but it is changing only appearance of what is displayed in {cart_id}
    Appearance of what is displayed in {Count}{subs} is not changing.
    I guess the only way to change that is to do changes in shop.php file

  9. #8
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    no, the php files only modify what data is sent to the HTML.

    As I said, put a class in the td. Like

    Code:
    <td width="500" align="left" class="StyleNameHere"><a href="ViewCart.php?CartID={cart_id}" class="cartname">{name}</a><br>{Count}{subs}</td>
    and in the CSS do

    Code:
    .StyleNameHere{
      /*any styling you want*/
    }
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  10. #9
    Senior Member Shani's Avatar
    Join Date
    Nov 2004
    Posts
    1,140
    Member #
    8171
    {Count}{subs} is not a link.
    Shani

    I have an eye for detail like you'd never believe.

  11. #10
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Don't suppose you have a link you can post so we can look at least at the generated content?


Page 1 of 2 1 2 LastLast

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