Why is my template not reading this code? (6 posts)

  1. ariamythe
    Posted 1 year ago #

    My website, ariamythe.com, is driving me crazy. I am modifying an existing theme, and I can't find any reason in the code as to why my page won't read the instructions for styling links in my top menu. I want them to be smaller, spaced out, and white; they're larger, blacker, and bunched up.

    Here is the relevant css in my stylesheet.

    .top-nav {
    	width: 100%;
    	background: #f81e4a;
    	float: left;
    	border-bottom: solid 1px #F1F1F1;
    .top-menu .menu-item {
    	background: transparent;
    	border-bottom: solid 3px transparent;
    	float: left;
    .top-menu .menu-item > a {
    	font-size: 0.9rem;
    	display: inline-block;
    	padding: 4px;
    	margin-bottom: 3px;
    	background: #f81e4a !important;
    	color: #fff;
    	padding: 8px;
    .top-menu .menu-item > a:hover {
    	background: #594e65;

    It renders the code above it, and the code below it, but the code for styling menu-item > a it just won't execute.

    Anyone help me out here?

  2. RossMitchell
    Posted 1 year ago #

    What does firebug tell you ?

    My style guide tells me that the term which preceeds "> is a style item such as div or ul, you have a class.
    Could you try:

    .top-menu .menu-item a
  3. ariamythe
    Posted 1 year ago #

    Firebug doesn't see it.

    I tried the alternate code, and it still doesn't read.

  4. stephencottontail
    Posted 1 year ago #

    That extra ending bracket (}) above .top-menu .menu-item > a { is causing a parsing problem. Removing that should fix your problem.

  5. Tejas -The WP Chef
    Posted 1 year ago #

    Rightly suggested by stephencottontail -- remove extra bracket (}).. This should solve your problem.

    Still after that you have problem, feel free to let me know here. I might be of some help!

    Cheers :)

  6. ariamythe
    Posted 1 year ago #

    You know, i must have stared at that code twenty times and I never saw the extra brackets! Blind to my own mistakes. Thank you stephencottontail. That did it. :)

Topic Closed

This topic has been closed to new replies.

About this Topic