Jump to content

Last-Child Pseudo Selector Question[Solved]


DannyGolden

Recommended Posts

I solved my own question. (: I'm not sure what the syntax would be for this so I'm asking here. :PI'm setting up my footer and I'm putting a dividing line in between each link( | ) but I don't want one to appear on the last link as it throws off the design. I tried the last-child pseduo selector but it doesn't seem to work, or I have the syntax wrong. This is probably a silly mistake on my part but I'm sure you guys can figure it out instantly. Thanks in advance! HTML:

[/s][/s][s][s]<div id="footer">[/s][/s][s][s]		  <div class="footerlist">[/s][/s][s][s]			<ul>[/s][/s][s][s]				<li><a href="index.htm">Home</a></li>[/s][/s][s][s]				<li><a href="index.htm#contact">Contact Info</a></li>[/s][/s][s][s]				<li><a href="college.htm">College Info</a></li>[/s][/s][s][s]				<li><a href="links.htm">Links</a></li>[/s][/s][s][s]			</ul>[/s][/s][s][s]		  </div>[/s][/s][s][s]	   </div>[/s][/s][s][s]

CSS:

[/s][s].footerlist li {[/s][s]list-style: none;[/s][s]display: inline;[/s][s]}[/s][s].footerlist li::after {[/s][s]content: ' |'; /* Denotes a space before the diving line */[/s][s]}[/s][s].footerlist li::after:last-child {[/s][s]content:'';[/s][s]}[/s][s]
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...