Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Simple CSS question

Simple CSS question

Scheduled Pinned Locked Moved Web Development
csstutorialquestion
9 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xxrono
    wrote on last edited by
    #1

    Hi there .i just need a way to make different kinds of links Give an example please,if u have the time thanks

    G M F 3 Replies Last reply
    0
    • X xxrono

      Hi there .i just need a way to make different kinds of links Give an example please,if u have the time thanks

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      In what way do you want the links to be different?

      --- single minded; short sighted; long gone;

      X 1 Reply Last reply
      0
      • G Guffa

        In what way do you want the links to be different?

        --- single minded; short sighted; long gone;

        X Offline
        X Offline
        xxrono
        wrote on last edited by
        #3

        i create css for a link ok?and every link on the page follows this rule.i don't want that i want some of the links for example to have different color or hover behaviour thanks

        G 1 Reply Last reply
        0
        • X xxrono

          Hi there .i just need a way to make different kinds of links Give an example please,if u have the time thanks

          M Offline
          M Offline
          MatrixCoder
          wrote on last edited by
          #4

          You would have to specify a different class for each link that you want to be different. This might help you.


          Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.

          X 1 Reply Last reply
          0
          • M MatrixCoder

            You would have to specify a different class for each link that you want to be different. This might help you.


            Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.

            X Offline
            X Offline
            xxrono
            wrote on last edited by
            #5

            you mean maybe an id to each different type of links cause of what i understand they all follow the a:.... rule so maybe this could work? #link1{.. } , #link2{.. is the next thing i'll try thanks

            J 1 Reply Last reply
            0
            • X xxrono

              i create css for a link ok?and every link on the page follows this rule.i don't want that i want some of the links for example to have different color or hover behaviour thanks

              G Offline
              G Offline
              Guffa
              wrote on last edited by
              #6

              Here are some examples on how you can set style on links: All links with class="Info": a.Info { color: #fff; } All links within an element with class="Info": .Info a { color: #000; } All links within an element with id="Info": #Info a { color: #f00; } All links within a div tag within an element with class="Info": .Info div a { color: #00f; } All links within a div tag with class="More" within an element with class="Info": .Info div.More a { color: #0f0; }

              --- single minded; short sighted; long gone;

              X 1 Reply Last reply
              0
              • G Guffa

                Here are some examples on how you can set style on links: All links with class="Info": a.Info { color: #fff; } All links within an element with class="Info": .Info a { color: #000; } All links within an element with id="Info": #Info a { color: #f00; } All links within a div tag within an element with class="Info": .Info div a { color: #00f; } All links within a div tag with class="More" within an element with class="Info": .Info div.More a { color: #0f0; }

                --- single minded; short sighted; long gone;

                X Offline
                X Offline
                xxrono
                wrote on last edited by
                #7

                exactly what i was looking for ,man thanks

                ninja coding

                1 Reply Last reply
                0
                • X xxrono

                  Hi there .i just need a way to make different kinds of links Give an example please,if u have the time thanks

                  F Offline
                  F Offline
                  Fred_Smith
                  wrote on last edited by
                  #8

                  Simple CSS ? No such thing. CSS: great idea, lousy implementation. IMHO. Fred

                  1 Reply Last reply
                  0
                  • X xxrono

                    you mean maybe an id to each different type of links cause of what i understand they all follow the a:.... rule so maybe this could work? #link1{.. } , #link2{.. is the next thing i'll try thanks

                    J Offline
                    J Offline
                    JimmyRopes
                    wrote on last edited by
                    #9

                    xxrono wrote:

                    you mean maybe an id to each different type of links

                    Use class instead of id if you have more than one occurrence of the type on a page and you are going to validate against an XHTML validating parser. I am not sure about HTML, because I code and validate my pages using XHTML 1.0 specification, but in XHTML each id needs to be unique. You can have multiple elements of a class and can accomplish the required formatting of groups of elements using CSS.

                    Simply Elegant Designs JimmyRopes Designs
                    Think inside the box! ProActive Secure Systems
                    I'm on-line therefore I am. JimmyRopes

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups