A cosmetic issue. The seach field and its button are not alligned - same results in ie, firefox and opera..

See the attached screenshot.

Comments

netbjarne’s picture

Status: Active » Needs review
StatusFileSize
new26.33 KB

Dunno if this is the way to submit fixes, But I'll give it a try anyway.

I've been studying the styles.css file of the pushbutton theme, in order to find a fix for the unaligned search field and button. I'm no css expert, so this fix is based purely on experimentation, but it works.

Here's what I came up with :

Find this:

#search .form-text, #search .form-submit {
  border: 1px solid #369;
  font-size: 0.85em;
}
#search .form-text {
  width: 8em;
  height: 1.4em;
  padding: 0 0.5em 0 0.5em;
  margin: 0 0 0.5em 0;
}
#search .form-submit {
  height: 1.5em;
}

and replace with this

#search .form-text, #search .form-submit {
  margin: 4px 0px 4px 0px;
}
#search .form-text {
  width: 8em;
}
#search .form-submit {
}

The result looks fine in opera, firefox and ie, and w3c validates - see attached screenshot.

You may check the result out yourself here: http://drupaldanmark.dk/

Best regards
Bjarne

netbjarne’s picture

StatusFileSize
new13.53 KB

Actually, the same fix works for the blumemarine theme (see attached screenshot).

In /themes/bluemarine/style.css

Find:

#search .form-text, #search .form-submit {
  border: 1px solid #369;
  font-size: 1.1em;
}
#search .form-text {
  width: 8em;
  height: 1.4em;
  padding: 0 0.5em 0 0.5em;
  margin: 0 0 0.5em 0;
}
#search .form-submit {
  height: 1.5em;
}

Replace with:

#search .form-text, #search .form-submit {
  margin: 4px 0 4px 0;
}
#search .form-text {
  width: 8em;
}
#search .form-submit {
}

Again, I have tested in latest versions of Opera, Firefox and IE6.
//Bjarne

dries’s picture

Can you make a real patch? See this page for more information.

Steven’s picture

It is a bad idea to hardcode pixel heights. You should find where that margin is coming from and undo it properly.

netbjarne’s picture

Title: Search field and button unaligned.. » Search field and button unaligned; patch for pushbutton
StatusFileSize
new727 bytes

#3 - well, heres a try. Testing several windows cvs frontends, I found that only TortoiseCVS fitted my needs and was easy to use (http://drupal.org/node/22293)

Here's a patch for the pushbutton theme (also attached)

Index: themes/pushbutton/style.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/pushbutton/style.css,v
retrieving revision 1.12
diff -u -r1.12 style.css
--- themes/pushbutton/style.css	2 Sep 2005 19:18:14 -0000	1.12
+++ themes/pushbutton/style.css	4 Jan 2006 11:34:00 -0000
@@ -207,16 +207,13 @@
 }
 #search .form-text, #search .form-submit {
   border: 1px solid #369;
-  font-size: 0.85em;
+  font-size: 0.85em;  
+  margin: 0.3em 0 0.3em 0;
 }
 #search .form-text {
   width: 8em;
-  height: 1.4em;
-  padding: 0 0.5em 0 0.5em;
-  margin: 0 0 0.5em 0;
 }
 #search .form-submit {
-  height: 1.5em;
 }
 #mission {
   background-color: #fff;

#4, hmm. fixed pixelheight for margins are used in several other places in the stylesheet, but, now i've chose a 0.3em margin instead of a 4px margin - is that what you meant?- results are fine in firefox, opera and ie, and w3c validates.

netbjarne’s picture

Title: Search field and button unaligned; patch for pushbutton » Search field and button unaligned; patch for pushbutton and bluemarine
StatusFileSize
new725 bytes

And here is a patch for the bluemarine theme:

Index: themes/bluemarine/style.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/bluemarine/style.css,v
retrieving revision 1.11
diff -u -r1.11 style.css
--- themes/bluemarine/style.css	2 Sep 2005 19:18:14 -0000	1.11
+++ themes/bluemarine/style.css	4 Jan 2006 11:44:27 -0000
@@ -114,16 +114,13 @@
 }
 #search .form-text, #search .form-submit {
   border: 1px solid #369;
-  font-size: 1.1em;
+  font-size: 1.0em;  
+  margin: 0.3em 0 0.3em 0;
 }
 #search .form-text {
   width: 8em;
-  height: 1.4em;
-  padding: 0 0.5em 0 0.5em;
-  margin: 0 0 0.5em 0;
 }
 #search .form-submit {
-  height: 1.5em;
 }
 #mission {
   background-color: #369;

I hope that this can help.

//Bjarne

netbjarne’s picture

Version: 4.7.0-beta2 » 4.7.0-beta3

Hi folks

This cosmetic glitch still applies to beta 3.

Regards
Bjarne

netbjarne’s picture

Version: 4.7.0-beta3 » 4.7.0-beta4

Same issue applies to beta 4 ;-)

Tobias Maier’s picture

Version: 4.7.0-beta4 » x.y.z

Hello,

first of all thank you that you try to fix this.

but as Steven wrote:

You should find where that margin is coming from and undo it properly.

therefore you should take a look at misc/drupal.css and look if you could simplify a little bit what you see there and if you could fix this issue there (because it could be an issue which comes from drupal.css)

beside this I saw the following change in your patch:

 #search .form-submit {
-  height: 1.5em;
 }

why not removing this entirely?

Thanks again

Tobias

dries’s picture

Feel free to roll a new patch with that removed, so we can test it. :)

netbjarne’s picture

Aaaaaah, you guys. Not only do you want us drupal fans to help fixing the bugs, you also want us to do it right! - now what kind of attitude is that ;-)

I'm a totally css ignorant, all my html knowledge dates back to 1998 where css's were "future technology" (at least to me) - so the patch I came up with, was merely the fortunate results of trial and error. So, the hint "find out where the margin comes from", does not mean much to me. Still, I would be happy to dig more into this and see if I can come up with a patch that satisfies - but don't hold your breath :-)

Kind regards
Bjarne

pcwick’s picture

Status: Needs review » Fixed

On 2006-09-04 I could not reproduce this error in both Bluemarine and Push Button themes, on either Firefox or Opera browsers. It appears to have been fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)