• Resolved Emerogorek

    (@emerogorek)


    In my web site, [SGA.ProferssorsPlace.Info] I have two entries [Sillybus & Stuff/Sillabus2 and Sillybus & Stuff/Syllabus] that show the problem.

    In Syllabus2 I have my information set up in two tables and use anchors to get to and back from the selected information. This was designed when I was first learning HTML and used a minimal amount of code.

    In Syllabus2 I have added CSS and HTML code to bring it up to date with the technology.

    The problem is that I cannot get the web page to look as good as when I had the code in Notepad++ and would run it in a browser. There should be two tables, side by side at the top and framing around the 2nd and 3rd tables.

    Are there any directives that need to be added to get WordPress to see my added html code?

    I plan to move my CSS to the Twenty Ten Child theme figuring that I will be using the code as I update other pages.

Viewing 15 replies - 1 through 15 (of 22 total)
  • Thread Starter Emerogorek

    (@emerogorek)

    UPDATE: In case anyone has looked at the site, I had copied in the wrong copy of the code. As of 11:00 3/21 the latest and greatest version is in place.

    I’m not sure which page you are asking about – or what’s not working right. Can you be more specific?

    In general, WP themes have CSS that will affect elements on the page unless you modify that CSS. You should be able to use Firebug or Chrome Dev. Tools to see what’s going on with the CSS if it’s not behaving the way you want.

    Thread Starter Emerogorek

    (@emerogorek)

    Ok, It took me a while to get back here. I guess this using this line will get you there:
    sga.professorsplace.info/?page_id=705

    The problem is that when I use the same code in notepad++ and through a browser, the table is in color, outlined, and fits better in the screen.

    The code passes validation for HTML5.

    First problem is that you should not put CSS into the content section of your site. It needs to go in an external file. You should also make a child theme so that your changes to the theme are not lost when WP is updated –

    https://codex.www.ads-software.com/Child_Themes

    Set that up and add your CSS code there. And then you’ll also need to use Firebug to look at the theme’s CSS and modify any that’s creating styles that you don’t want.

    Thread Starter Emerogorek

    (@emerogorek)

    I had already tested it with CSS in the child theme. No change. I figured that if I had it in the code page then someone troubleshooting it might see an answer.

    I prefer it to be in the Child theme as it will allow me to use the same styles in other pages, that is if WordPress is capable of handling it.

    Yes, WP handles external CSS files just fine. But there’s no way to help without seeing it live – I’d be happy to look at it if you can activate the child theme and put the CSS in the style.css file.

    Thread Starter Emerogorek

    (@emerogorek)

    I guess herein lies the problem. Are you saying that CSS won’t run if it is in the head of the html page?

    Using the Appearance/Editor, I moved the CSS in what is called “Twenty Ten Child: Stylesheet (style.css)” Is that not where it should be? I tried this here yesterday with no results.

    If the child theme is not activated, how do I make it so?

    Yes, it would go in style.css of the child theme. Child themes are activated like any other theme – Appearance > Themes — find the child theme and click activate.

    CSS will work in WP the same as any other site – inline, internal or external. External is much better because it’s available to the entire site.

    BTW, in the page you linked above the CSS was in the content section of the site, not the head.

    Thread Starter Emerogorek

    (@emerogorek)

    I stand chastised and rebuked (: It is a matter of learning the terminology.

    I figured that the topic was far enough from the original that I started a new thread. Closing rather than deleting that new one gets inquiring minds to this one anyway.

    Any comment about the table problem?

    No worries, I know it’s a bit confusing at first around here. And great to see you got that child theme set up. Now, yes, here’s the problem – the theme has this CSS:

    #content table {
        border: 1px solid #e7e7e7;
        margin: 0 -1px 24px 0;
        text-align: left;
        width: 100%;
    }

    That’s more specific than your CSS – so it’s taking precedence. Try adding the #content selector to your CSS – and then it will work the way you intend :)!

    i.e. this works:

    #content #table1 {float: left; width:100px; color:red;}
    #content #table2 {float: right; width:10px;}

    Thread Starter Emerogorek

    (@emerogorek)

    That’s it! The log jam has been opened.
    That was the only real problem all along. Not much else was changed. Now I will have to look into seeing what “#content” means. (:

    I did learn a lot about using ^U to see the code and found a few others minor fixes.

    Thread Starter Emerogorek

    (@emerogorek)

    Thanks…

    #content is just an ID assigned to that section of the theme. Yep, the browser tools are the magic key to CSS work :)!

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘HTML in my blog problem’ is closed to new replies.