WordPress.org

Ready to get started?Download WordPress

Forums

Style issues (22 posts)

  1. davincim
    Member
    Posted 7 years ago #

    I've recently implemented a new theme for my blog: Freshy 1.0. One of the things that I'm trying to do is to remove a bullet from the subheading "Links" in my sidebar: http://www.familywebwatch.com/blog .

    In Firefox it shows just a fraction of it. In IE it shows the entire bullet. (Most of the sidebar is made up of widgets, btw.) What I find odd is that it's the only subheading that has it. I've searched all over for where it says to show that, but it continues to show despite my attempts to edit.

    The other thing I'm having trouble with is my contact form, which uses the WP-Contact plugin. The issue here is that in FF the message field extends into the sidebar; in IE it doesn't.

    I understand IE and FF each have their own way of dealing with styles, but I'm wondering if I'm just overlooking something in my code that can help me control the width of that box.

    The solution could be staring me right in the face, but another set of eyes would be most appreciated. :)

  2. Samuel B
    moderator
    Posted 7 years ago #

    To even have a chance you should probably fix some of these:
    http://validator.w3.org/check?uri=http%3A%2F%2Ffamilywebwatch.com%2Fblog%2F

  3. davincim
    Member
    Posted 7 years ago #

    Goodness that's quite a few errors! Some of the things it picked up I'd have to question the reliability. If I'm reading the results right, it appears to be adding spaces and calling those errors. I'll take a more thorough look and see what I can do. Not sure how much of it is my posts or how much is the template, but good info to know.

    But errors aside, they wouldn't necessarily keep me from making the modifications I listed above would they?

  4. moshu
    Member
    Posted 7 years ago #

    I'd have to question the reliability.

    You shouldn't. Trust me: those are all real errors and 99.99% caused by the user/blogger: either by posting or by adding faulty code to the template files.

  5. Doodlebee
    Member
    Posted 7 years ago #

    Plus, it's *cascading*. Start at the top and fix error #1 first. Usually, you'll end up finding that fixing *one* error causes the rest to fall back into place.

  6. davincim
    Member
    Posted 7 years ago #

    All good advice and I really do appreciate it!

    Looks like I have to reconsider the theme I'm using, although I can't say for sure. A lot of that stuff appears to be referencing things that I wouldn't have a clue to modify to even generate such errors (like #1).

    On that note, things that I have changed and see errors on is why I'm questioning some of the reliability of the validator. Error #4 is one such item. It's not recognizing the "target" attribute? Isn't that standard or am I using it wrong?

    And errors 2, 3, 5 and 6 are all related to an image that I have in my uploads folder. That's one file that I've put in several of my posts using the Upload/Browse All feature when writing a post. Isn't that the way that feature is supposed to work - to be able to pull the same image from before and put where I want?

    I'm open to making the changes needed, but as you pointed out doodlebee, I'm hoping that fixing the early ones will resolve the later ones because that's quite an intimidating list. :)

    Can someone help me get started on how I should fix #1?

  7. vkaryl
    Member
    Posted 7 years ago #

    The target attribute isn't valid in various XHTML versions. If you're going to have XHTML (like wordpress), you can't use the target attribute.

    As for #1, just delete language="javascript" - it's deprecated.

  8. whooami
    Member
    Posted 7 years ago #

    <script language="javascript" type="text/javascript" src="http://www.familywebwatch.com/blog/wp-content/plugins/fancytooltips/fancytooltips.js"></script>

    it told you the problem.

    that needs to be this:

    <script type="text/javascript" src="http://www.familywebwatch.com/blog/wp-content/plugins/fancytooltips/fancytooltips.js"></script>

    if thats being called via a plugin, then you'll need to edit the plugin inseting it.

  9. moshu
    Member
    Posted 7 years ago #

    Re image: since the image has a unique ID - you cannot use it more than once. IDs can be used only once in a page. Eventually, removing the ID part from its code you'll be able to re-use it.

    error #1. - comes from the fancytooltip gizmo

    (hint: check the Show source and click Revalidate: every error line # will become a link taking your to the exact location of the error)

  10. davincim
    Member
    Posted 7 years ago #

    Thanks everyone. Gonna roll up my sleeves and dive into this thing. I'll report back. If anyone has comments in the meantime, I'll be keeping an eye open for them. :)

  11. moshu
    Member
    Posted 7 years ago #

    When having troubles figuring out what the XHTML rules are: http://www.w3schools.com/xhtml/default.asp

  12. davincim
    Member
    Posted 7 years ago #

    Thanks, moshu. One quick question about the image thing. You said removing the ID part from the code -- can you elaborate on that please?

    I've only used the upload/browse all feature for this one image, so it'll be easy enough to re-upload it to the other posts, but if I understand correctly, doesn't that mean that the image in question is going to show up in the browse all box for each instance I've used it?

  13. moshu
    Member
    Posted 7 years ago #

    Are you using the damned wysiwyg thing? (otherwise you would see the code that is generated when putting the image in the post ;)

  14. davincim
    Member
    Posted 7 years ago #

    Oh I see what you're talking about now. Yes, it's there and will be removed. I thought you were referring to code in one of the the WP files. :)

  15. davincim
    Member
    Posted 7 years ago #

    Okay, I've done some work and finally got it to validate. Still have some questions though.

    I changed my theme to mandigo and that drastically reduced my errors. I also deactivated my widgets and am currently using the standard sidebar.

    It's when I add some javascript for "MyBlogLog" that causes my blog to not validate. I've kept it in my sidebar for now in case it needs to be referred to, so my blog currently does NOT validate for that reason.

    I've read here and in other documentation that javascript doesn't play well in WP, or with PHP to be more accurate, but there is a workaround: http://codex.wordpress.org/Using_Javascript

    However, I'm not quite clear on how to implement the solution described on that page. The example on the link above refers to emailpage.js. I don't have a file; rather I'm inserting code to call the file that resides over at MyBlogLog. Is there still a way I can implement the solution by using the header and other code described in that example?

    I've also included a table of buttons at the bottom of the sidebar. To add space I've been using the break tags. For reasons I don't understand when I try to validate with that code in there, I get an error saying that it's not allowed in that context. Why?

  16. Root
    Member
    Posted 7 years ago #

    Breaks are not allowed in lists.

  17. moshu
    Member
    Posted 7 years ago #

    Usually, with the code snippets like the one from Mybloglog the problem is they are not XHTML compatible.
    Copy/paste the code in a plain editor that has find-replace ability and replace all the & characters with &amp;

  18. Doodlebee
    Member
    Posted 7 years ago #

    Yes - what moshu said - replace all instances of & with &amp; -but also, you need to remember that XHTML code needs to be written in lowercase letters. You have a few instances of <A> and <IMG> - those should be <a> and <img>

  19. davincim
    Member
    Posted 7 years ago #

    I replaced the characters as you suggested, but it does not validate event with the changes. So it looks like I'm faced with deciding on whether I want to include that bit of code or not. Unless, of course, you might have another idea I may try. I've removed the code for now.

    The reason my code doesn't validate now is because I've left a table in their that's nested in a <li> tag, which is for the buttons at the end of my sidebar. I don't know of an alternative to getting those in there without a table and keeping it within the shaded background.

    The reason I'm using a table is so I can make more efficient use of the space (two buttons per row as opposed to one per row). And I was thinking of using a transparent gif to replace the stars so I don't have what looks like an orphaned star next to this table. I know it's there because of the <li>, but I didn't like those stars anyway.

    Your thoughts?

  20. moshu
    Member
    Posted 7 years ago #

    If you need table anyway... put it outside of the list, after the closing /ul.

  21. davincim
    Member
    Posted 7 years ago #

    Thanks for that tip, doodlebee. I just now took care of that reference in my sidebar. I'll have to dig in my posts to see if I've made that same error and run a check in other files.

  22. davincim
    Member
    Posted 7 years ago #

    Hey, I got it to validate! It turns out that even with the MyBlogLog code -- with the character replacement -- that it works out fine.

    moshu: I failed to mention that I had already tried to add that table outside of the sidebar/shaded background. The problem there was that it was shifting to the left and despite my efforts with using "padding-left" or "margin-left" style attributes it just wouldn't budge. And when I had those errors show up in that area I figured it was a lost cause. However, after I did a little more analyzing of the errors I was able to make a few more tweaks and was therefore able to include it!

    Tons of thanks to everyone who helped me!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags