- This topic is empty.
-
AuthorPosts
-
November 25, 2011 at 2:19 pm #91300tobeeornotMember
Ok, success with the main-nav. The css wasn’t set to #navigation and now it is the span is fine.
The sub-nav is still a problem, though. I’m guessing it is because the main selector contains a li and a:
#sub-navigation li a{
display:block;
background-color:#647484;
color:white; font:1.6em Verdana,Geneva,sans-serif;
padding:10px 10px 10px 25px; position:relative;
text-decoration:none; margin:0 0 5px 0;
width:233px;}The problem is that if I change the css to match what WP is outputting here, the nav itself distorts.
November 25, 2011 at 2:39 pm #91301TheDocMemberNothing looks wrong with the sub nav CSS. Inspect inspect inspect. Look for what rules are being applied that shouldn’t, and what rules aren’t being applied that should.
November 25, 2011 at 2:58 pm #91302tobeeornotMemberWell, based on the code below, the span is not pointing to anything at the moment. Should it be pointing to .menu-item?
November 25, 2011 at 3:09 pm #91304TheDocMemberThe CSS you posted is this:
#sub-navigation li a{
display:block;
background-color:#647484;
color:white; font:1.6em Verdana,Geneva,sans-serif;
padding:10px 10px 10px 25px; position:relative;
text-decoration:none; margin:0 0 5px 0;
width:233px;}It should have no problem accessing the HTML that you just posted.
November 25, 2011 at 3:16 pm #91305tobeeornotMemberI have no idea what’s wrong then…and I am not sure how the inspector can identify it either since it only matches the code that is assigned to the element inspected.
November 25, 2011 at 4:23 pm #91306TheDocMemberYou should inspect the anchor tag and see what styles are being applied to it.
November 26, 2011 at 2:04 pm #91342tobeeornotMember@TheDoc Right, I thought I would do the right thing and learn more about Chrome Inspector before replying, and while my experiences were informative, I am still in the dark with this issue. The anchor tag is applying the styles as above and those applied to the nth:child. The nth:child styles had ul tags o them so I deleted them but no success.
You probably can’t suggest too much but I thought I would let you know how I was getting on.
November 26, 2011 at 2:11 pm #91343chrisburtonParticipantCan you put your menu specific html and css on jsfiddle?
November 26, 2011 at 2:19 pm #91346tobeeornotMember@ChristopherBurton – I have a html test page and it is working fine recognizing the span tags. The problem seems to be that the WP nav is reading the styles slightly differently. Would a jfiddle example still be worth it?
November 26, 2011 at 2:26 pm #91347chrisburtonParticipantMaybe not. After @The_Doc has helped you, what seems to be the issue?
November 26, 2011 at 2:30 pm #91348tobeeornotMember@ChristopherBurton – basically, I adjusted my styles to match the code that WP is outputting but it isn’t recognizing the span tags, which is strange and I am sure the css is right. I then used Chrome Inspector to try and spot any differences but without success.
November 26, 2011 at 2:37 pm #91349chrisburtonParticipantTry giving the spans a class name and adjust your CSS accordingly.
November 26, 2011 at 2:43 pm #91350tobeeornotMemberGood suggestion but nope. Maybe I should upload the site to a live server? Would that be easier for people to troubleshoot?
November 26, 2011 at 2:48 pm #91351chrisburtonParticipantTremendously
December 9, 2011 at 9:13 am #92330tobeeornotMemberThis is the test. As you an see the sub nav on the left has no nubs on the background like the rest.
This is what he tags should like in red on the left.
Any ideas guys?
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.