Heya guys.

Okay, basic skinning issue I am running into just trying to get the quick and dirty bits down. I am using the slash theme but I am pretty sure this may apply across the board.

I am trying to make the header bar (with the logo) loose it's vertical height (I am embedding this within my normal site under the header so trying to buy some realestate here)

HTML wise it is expanded because there is a <br class="clear" /></div> at the end, causing the expanded header bar.

Going to the template the applicable code area is

<?php if ($logo) : ?>

<a href="<?php print $base_path ?>" title="<?php print t('Home') ?>"><img id="logo" src="<?php print($logo) ?>" alt="Logo" /></a>

<?php endif; ?>

<?php if ($search_box): ?>

With <?php endif; ?> obviously being where the information is contained.

Now, I am still a novice, so can someone tell me what the best quick edit is for this, removing it all together will just cause the page not to load. What I believe needs to be done is to remove it and then </div> in its place. However I want to be sure that will not screw something else up, and out of curiosity (and for future edits) where can I find the information that <?php endif; ?> is printing out?

Comments

Malkavbug’s picture

Same issue if I try and erase the line and just add in </div> manually.

So I need some direction

niosop’s picture

Hi,

I'm confused as to what you're trying to say.

<?php if ($logo) : ?> 

<a href="<?php print $base_path ?>" title="<?php print t('Home') ?>"><img id="logo" src="<?php print($logo) ?>" alt="Logo" /></a>

<?php endif; ?>

The endif is just closing the if statement, it doesn't output anything. Basically, if there's a logo, display the image. If there's not a logo, don't display it. There's no div in there, just an href and an img.

Maybe I'm totally misunderstanding your question, if so could you please restate it?

Niosop

Malkavbug’s picture

<?php endif; ?>

<?php if ($search_box): ?>
<?php if ($search_url): ?>
<form action="<?php print $search_url ?>" method="post">

So then it would be printing it out when the search_box is called?

...... nevermind.... this file is super well spaced out. I finally found the part about 50 lines of code down

However, even with it removed the space is still there, so it must be a CSS thing with the div

yes?no?thoughts?

niosop’s picture

Any chance of pointing us to the site so we can see what you're talking about?

styro’s picture

<br class="clear" /></div> is probably being printed out lower down the template.

The PHP 'if's and 'endif's don't print anything at all. They are logical tests - if the bit with the 'if' is true, then the bit between the 'if' and the next 'endif' is printed. The </a> will be the last thing the code you quoted would print out, the following PHP bits won't print anything.

--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ
Example Knowledge Base built using Drupal

styro’s picture

The code you want is being printed out waay further down - ie at the bottom of this bit:

<body <?php print theme("onload_attribute"); ?>>
<?php global $user ?>
<div id="header">

<?php if ($logo) : ?>
<a href="<?php print $base_path ?>" title="<?php print t('Home') ?>"><img id="logo" src="<?php print($logo) ?>" alt="Logo" /></a>
<?php endif; ?>

<?php if ($search_box): ?>
<?php if ($search_url): ?>
<form action="<?php print $search_url ?>" method="post">
<div id="search">
<input class="form-text" type="text" size="15" value="" name="edit[keys]" /><input class="form-submit" type="submit" value="<?php print $search_button_text ?>" />
</div>
</form>
<?php else: ?>
<?php print $search_box ?>
<?php endif; ?>
<?php endif; ?>

<?php if ($site_name) : ?>
<h1 id="site-name"><a href="<?php print $base_path ?>" title="<?php print t('Home') ?>"><?php print($site_name) ?></a></h1>
<?php endif;?>
<?php if ($site_slogan) : ?>
<span id="site-slogan"><?php print($site_slogan) ?></span>
<?php endif;?>
<br class="clear" />
</div>

You may find that removing it breaks the rendering in other ways though.

--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ
Example Knowledge Base built using Drupal

Malkavbug’s picture

Still have the huge gap there

http://articles.youstockit.com

this is what I get from not brushing up on CSS

styro’s picture

There is this bit in your themes common.css

/* Header */

#header {
  min-height: 30px;
  _height: 30px;
} /

Do you use the Firefox Web Developer extension? It is a must have for tracking down CSS issues.

--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ
Example Knowledge Base built using Drupal

Malkavbug’s picture

I have the extension, but assumed it was that line break. Ended up finding it though

At least skinning has a sense of satisfaction once it is all said and done

Malkavbug’s picture

Was located on common.css

/* Header */

#header {
  min-height: 40px;
  _height: 90px;
} /* Fixing IE6 bug, a underscore before a attribute make other browsers ignore it */

Thanks though guys. Quickest replies I have ever seen on a support site :)