• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Coding questions


Xenonsoft

Active Member
#1
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
 

Greg

Active Member
#2
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
 

Harry

Senior Member
#3
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>
 

Xenonsoft

Active Member
#7
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
 

Jazajay

Active Member
#8
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
 

Jazajay

Active Member
#10
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:
 

Xenonsoft

Active Member
#14
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
Xenonsoft said:
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:
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.
 

Xenonsoft

Active Member
#17
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?
 

Harry

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

Xenonsoft

Active Member
#19
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?
 

Harry

Senior Member
#20
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?