Coding questions

Design Forums > Web Design Forums > Web Coding & Development > Coding questions


Reply
 
LinkBack Thread Tools Display Modes
Fred is offline
AWOL
1,002 Posts
Essex, England
Coding questions

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

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

Key:
Blue - CSS



Fred Rivett
__awol______
[[ Home | Playground | Twitter ]]
  Quote Post 1 Posted 18-03-09
Greg is offline
Freelancer/Team DF
3,517 Posts
Kent, UK
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



Quick ways you can help Design Forums
Make a blog post about Design Forums
Invite your friends & contacts along
  Quote Post 2 Posted 18-03-09
Harry is offline
Web Developer
1,296 Posts
Leeds, UK
It's going to affect all links in a list item in a list with an id of id.

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



Last edited by Harry; 18-03-09 at 12:22 PM..
  Quote Post 3 Posted 18-03-09
Greg is offline
Freelancer/Team DF
3,517 Posts
Kent, UK
Harry said it better and in fewer words ^



Quick ways you can help Design Forums
Make a blog post about Design Forums
Invite your friends & contacts along
  Quote Post 4 Posted 18-03-09
Harry is offline
Web Developer
1,296 Posts
Leeds, UK
Quote:
Originally Posted by Greg View Post
Harry said it better and in fewer words ^
Haha, you beat me to the reply and was going to say that your explanation was probably better lol.


  Quote Post 5 Posted 18-03-09
chrismitchell is offline
Giggidy / Team DF
4,479 Posts
Milton Keynes
I was completely beaten to it too...



The Widdler's Wee Online Farm
Follow us on Twitter
Just remember.. no matter how happy you think you are, you're never as happy as a Pineapple Chunk... They're well happy!
Don't forget to donate blood!
  Quote Post 6 Posted 18-03-09
Fred is offline
AWOL
1,002 Posts
Essex, England
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



Fred Rivett
__awol______
[[ Home | Playground | Twitter ]]
  Quote Post 7 Posted 18-03-09
Jazajay is offline
All round nice guy
1,215 Posts
Leicester, UK
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......

Jaz



Do your bit keep children safe and report illegal content to the IWF.
ADHD or a reaction to food additives? The Hyperactive Children's Support Group
Ever wondered how to create a contact form for your site? Then follow this easy tutorial
Does your site meet the legal requirements of the DDA? Not sure then find out if it does
  Quote Post 8 Posted 18-03-09
Fred is offline
AWOL
1,002 Posts
Essex, England
Poor Jaz, heads up lad



Fred Rivett
__awol______
[[ Home | Playground | Twitter ]]
  Quote Post 9 Posted 18-03-09
Jazajay is offline
All round nice guy
1,215 Posts
Leicester, UK
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.



Do your bit keep children safe and report illegal content to the IWF.
ADHD or a reaction to food additives? The Hyperactive Children's Support Group
Ever wondered how to create a contact form for your site? Then follow this easy tutorial
Does your site meet the legal requirements of the DDA? Not sure then find out if it does

Last edited by Jazajay; 18-03-09 at 07:19 PM..
  Quote Post 10 Posted 18-03-09
Tags: coding, questions
Reply

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



vBulletin® Copyright ©2000-2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0