Did you create /mydir in the classic template directory?
Don’t know if that space between url and ( are causing the problem.
Otherwise try add the stylesheet outside of the CSS file in the header.
<link rel=”stylesheet” href=”<?php bloginfo(‘template_directory’); ?>/mycss.css” type=”text/css” media=”all” />
And try add !important at the end of the lines to see if it’s a problem of hierarchy.
body { background:red !important; }
@mcl
I was searching around for a solution and I realized that you added the @import declaration to the end of the style.css.
@import rules must always be first in a document… try moving it to the top of the file.
To override styles that may have been defined subsequently, you can always add a !important with each declaration..
Eg.
body {
background: red !important;
font-size: 2em !important;
}
Thread Starter
mcl
(@mcl)
Thanks for all the replies.
I tried moving the @import to the start of style.css
and I moved my mycss.css to the same directory as style.css, so now they are both in the same directory.
my style.css now has @import url(‘mycss.css’) on the first line before the comments.
I created a class of mine and used it on a blog
<P class=”tt_one”>This shoulbe red and 3ems</P>
But still it is not working.
I do not know where to put the <LINK part, but I guess that means editing php files and I was trying to avoid that.
Apologies if I am being extremely stupid and not understanding some fundamental design aspect.
Richard
Your custom CSS is probably being over-written by the default styling further down style.css.
Suggestion: Copy the complete style.css file – except for comment section at the top – and save the copy as a new file in your theme directory called default.css.
Next, remove all CSS content from style.css but make sure that you leave the comment section intact. Below this section add:
@import url(default.css);
@import url(mycss.css);
This will cause your custom css to load after the default styling and always take precedence. Just make all future changes to mycss.css in future.
Thread Starter
mcl
(@mcl)
The last suggestion seems a clean solution to adding my changes.
I have now got something happening, so thank you all again for your help.
Richard
Thread Starter
mcl
(@mcl)
My idea of formatting my blogs has been severely shattered.
My blogs are articles about trees and I wanted them in a standardised format, which I would bulk import as CSV files, which I would create from my existing Access Database.
It seems the blog page has a mind of its own, in how it interprets HTML tags.
I wanted initially to use a table layout, but I discovered that was not supported, so I worked out a layout using <P> tags and CSS, but sometimes they work and sometimes they are ignored and sometimes they just get lost altogether and do not appear. Research on here has told me that, my problems, are not unique.
Can anyone recommend any way to do what I want, without getting involved in PHP and new Themes. I am running version 2.8.5 on a hosted ISP.
Thanks
Richard
It seems the blog page has a mind of its own, in how it interprets HTML tags.
It’s far more likely that it’s the CSS in your theme that’s the issue – assuming, of course, that your markup is valid. Can you post a link to a page demonstrating some of the problems you’re having?