Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS - changing text on change

    Ok, I have a table with three columns.

    The first column has a list of links in it, and the second and third columns are blank.

    I want to click on a link in the first column, and have text/links appear in the second column.

    Then likewise, click on links in the second column and have text appear in the third column.

    I know you can do this using other methods like Javascript, but can't you do it with CSS (layering, or something)? If so, how?

    Thank you

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    With just the right nesting you could probably cobble together something with the :focus pseudo-class but it would be a real trainwreck of code and the HTML it would need might not validate.

    Like you said, this is best left to javascript. CSS is intended for style control rather than content control.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #3
    New Coder
    Join Date
    Dec 2009
    Posts
    96
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Or you can use frames to get and place info in other frames.

  • #4
    New to the CF scene
    Join Date
    May 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you.

    I messed around with nesting and you are correct - it is a train wreck. I got half of it to work, but then got stuck.

    Oh well.

    I was thinking that I could make multiple text boxes, position them on top of each other, and bring one to the front with a link. With the amount of information I am thinking of placing in the tables, I suppose that would be a logistics nightmare, if it would even work.

    I think I'll go with the JavaScript.

    Thanks again


  •  

    Posting Permissions

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