Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Coding questions

Discussion in 'Website Design Forum:' started by Xenonsoft, Mar 18, 2009.

  1. Xenonsoft

    Xenonsoft Active Member

    Most of these will be simple, hopefully people will just post up anything they've been wondering and someone knowledgable can answer. :cool:

    My question, very simple as it is, is:

    With the below CSS, does whatever is inside the brackets affect only the links inside a list, or is it all links and all lists? Something else maybe? (I believe it's the links inside list tags, otherwise it would be li, a?)
    #id li a { }

    Cheers :up:

    Key:
    Blue - CSS
     
  2. Greg

    Greg Active Member

    Hi Fred,

    It would affect links in lists within the #id..
    So for example lets say you have a div called 'content', and wanted to style lists within that div, it would be;
    #content li { }

    To style a link "a" within that list it would be...
    #content li a {
    text-decoration: none;
    }


    And then you can go on further from there, and style the link hover, etc...
    #content li a:hover {
    text-decoration: underline;
    }


    HTH
    Greg
     
  3. Harry

    Harry Senior Member

    It's going to affect all links in a list item in a list with an id of id.

    HTML:
    <ul id="id">
         <li>Here's a list item. <a href="#">I will get styled</a>!</li>
    </ul>
    
     
  4. Greg

    Greg Active Member

    Harry said it better and in fewer words ^ :D
     
  5. Harry

    Harry Senior Member

    Haha, you beat me to the reply and was going to say that your explanation was probably better lol.
     
  6. I was completely beaten to it too...
     
  7. Xenonsoft

    Xenonsoft Active Member

    Haha, as I thought, many thanks all :)

    I'm sure there'll be more questions coming from myself and (hopefully) others that will give you another chance to rush and answer :D
     
  8. Jazajay

    Jazajay Active Member

    Hay I remember when I was the coding god around these parts, the fact that Greg and Harry beat me to it, 3 hours before I even read it, well......:cry:

    Jaz
     
  9. Xenonsoft

    Xenonsoft Active Member

    Poor Jaz, heads up lad :cry:
     
  10. Jazajay

    Jazajay Active Member

    I have been trying Xenonsoft but I just cant stop crying buddy, but thanks for the attempt at trying to cheer me up, much appreciated buddy, even if it doesn't stop the tears, lol. :cry:
     
  11. Xenonsoft

    Xenonsoft Active Member

    Haha keep at it :angel:
     
  12. Xenonsoft

    Xenonsoft Active Member

    Does anyone know which browsers support transparency in PNG's and which don't?
     
  13. Aarlev

    Aarlev Member

  14. Xenonsoft

    Xenonsoft Active Member

    Yeah I saw that Soren, but realised it was posted a good 7 years ago!

    On that basis, I'm assuming the info is pretty out of date. Cheers for trying to help though:up:
     
  15. Aarlev

    Aarlev Member

    Oh lol. Didn't notice the date on that article :D. As far as I know it's only IE6 and lower that doesn't support PNG transparency. But you can still get around it with a few fixes.
     
  16. Xenonsoft

    Xenonsoft Active Member

    Cheers. IE6 again eh, ruining my plans. Now to work out my workaround..
     
  17. Xenonsoft

    Xenonsoft Active Member

    Is there a way to apply some CSS to ALL text, not just those in <p></p> tags? Or should I be putting all text in <p></p> tags, regardless of whether it's in a form or the like?
     
  18. Harry

    Harry Senior Member

    More specifics? As a general rule, text should always be contained in something in the text markup module (p, li, h1, h2 etc).
     
  19. Xenonsoft

    Xenonsoft Active Member

    Well, I've added a styling for all text in <p> tags, but I've got some in a Form. Should I add <p> tags to that, and style as such, or is there a way to denote all text in the document and style it?
     
  20. Harry

    Harry Senior Member

    Hmm, what text is it? You can put <p> tags inside form elements if it's a paragraph. It's not a label though is it?
     

Share This Page