Community & Support

CSS/Javascript does not work properly after modifying theme

I modified a theme based on Blue marine. I added new CSS properties.

The problem is after modification, the CSS and/or Javascript do not work properly. For example, I use HTMLArea module,. However, when creating a new page/story, the WYSIWYG editor does not show up. Additionally, when publishing pages, the options list (URL path, input format, etc, those with a triangle icon to click and expand) does not work: they are not clickable.

Any idea why it happened?

Thanks,

Comments

It sounds like you removed

It sounds like you removed (or hid) the PHP that prints $closure close to the end of the file. Just before the closing body tag you should have something like

  <?php print $closure ?>
  </body>

Thanks

Hi there,

Thanks for reply. I will try your suggestion.

Another question is that I have a few more CSS files. I would like to import them as well. How can I do that via $style? Currently I hard code the CSS import in template file, but that's not good, I think.

People often hard code any

People often hard code any additional css files in page.tpl.php. The zen theme (indirectly) calls drupal_add_css() in _phptemplate_variables for the case where $hook equals 'page' (_phptemplate_variables is an optional function in template.php that can be used to add other variables to a template or even override default values)

Got it

Thanks.

I guess it might be worth the time to explore how to do that since to hard code a few lines shall be fine, esp they are for CSS purpose.

Now it comes another problem. When I try to create a new page/story, the page layout seems not right. For example, there is a huge blank area between page top and the form (write a new page/story form).

The form is started with

<div class="node-form">
  <div class="standard">
<div class="form-item">

I tried to find the definition of css and the location of the node template for this form. I first edited the node.tpl.php, but the change has no impact on this form.

Could you please give me some idea on how to change the layout of this form?

Thanks,

I start with the Firefox

I start with the Firefox extension firebug and look at the html and determine where the white space is coming from and add appropriate css to reduce/remove the space. Sometimes extra space is due the themes unconditionally printing page elements (including any surrounding html) even when the element is not set. A couple of common such elements are tabs and messages.

Thanks again

It works well after adding this line.