oliviaok
Member
Posted 4 months ago #
Hi,
I have created a 2nd template with the help of Esmi.
I am having problems styling it. I was hoping it would inherit the css of the main template.
But is has not, is it possible to configure the 2nd template to inherit the same style as the main?
Or if I must change the style for 2nd template where do I add the code?
For example this page is using the 2nd template
http://www.calligraphycompany.com/handwritten-invitations
i want to add a margin but as you can see it is hitting the line.
how would i go about this?
thanks
oliviaok
Try using Firefox with the Firebug add-on for this kind of CSS work.
http://getfirebug.com/
oliviaok
Member
Posted 4 months ago #
hi esmi,
i have the firebug and use it when necessary to play with styling.
If I implement the style change it will apply to my main template also.
How to I implement it in my stylesheet to take action against my 2nd template only?
What classes are being generated on the <body> tag in the markup?
oliviaok
Member
Posted 4 months ago #
I am not sure if I understand your question?
In my css I have the following:
#container
#content
In my 2nd template i have:
</div><!-- #container -->
Look at the generated markup for your new custom page template. What classes are being generated on the <body> tag?
oliviaok
Member
Posted 4 months ago #
Custom template:
http://pastebin.com/cDdxjkcv
sorry not 100% with terminology
No - we need to see a page using this template.
oliviaok
Member
Posted 4 months ago #
You can selectively style that page by using body.page-template-onesidebar-php before all of your custom style selectors.
oliviaok
Member
Posted 4 months ago #
do you mean like this for example:
#container.page-template-onesidebar-php
{
blah blah blah....
}
No. Try:
body.page-template-onesidebar-php #container {
}
oliviaok
Member
Posted 4 months ago #
hi Esmi,
tried as you said, but did not work:
body.page-template-onesidebar-php #container {
margin-left: 220px;
}
That's probably because you don't actually have a div with an id of container in your theme! You need to use ids and classes that are actually in the page markup.
oliviaok
Member
Posted 4 months ago #
Oh dear, how do I do that?
That's what Firebug is for. You can inspect any element and see what CSS is being used on it.
oliviaok
Member
Posted 4 months ago #
yes your right.
thanks a lot, ive managed to work it out!