Jump to content


Photo

How to blend a form into a webdesign layout?


  • Please log in to reply
23 replies to this topic

#21 HHawk

HHawk

    Young Padawan

  • Members
  • Pip
  • 30 posts

Posted 08 September 2006 - 04:03 AM

Well I have been fooling a bit around with Google's search function, but whenever I add the </form> tag to the end, it's starting to use more space in the search field.

Example (with </form> tag): Screenshot 1

Example (without </form> tag): Screenshot 2

BTW; in both cases when I press enter, it does NOT do a search on Google? Any advice?

//edit

I take it you NEED the submit button, no matter what, right? Since I can't hide it, or at least I don't know how. Is it possible, to e.g. cheat it by making the submit button a 1px graphic or something? Cause I don't need the submit button to be visible, I will be using "enter-key" anyways. Please advice.

Well I finally get the search to work with Google, except the problem (the explained earlier in this posting) with the </form> tag is still there. Whenever I add that to make the search function work, it looks like Screenshot 1. Without the </form> tag, it looks like Screenshot 2, but the search does not work. Any help. Please.

Edited by HHawk, 08 September 2006 - 04:30 AM.


#22 HHawk

HHawk

    Young Padawan

  • Members
  • Pip
  • 30 posts

Posted 08 September 2006 - 06:13 AM

Nevermind... Fixed it. I should have put the </form> after the </td>
Works fine now. Thanks for all the help!

#23 HHawk

HHawk

    Young Padawan

  • Members
  • Pip
  • 30 posts

Posted 08 September 2006 - 06:43 AM

Well I seem to have one final small problem.

Though I use mainly Internet Explorer 7 for my browsing, I also sometimes use Mozilla Firefox. While the search inline boxes show up correctly with Internet Explorer 7, it fails in Mozilla Firefox.

I found the following on this problem:

if( document.addEventListener ) »
document.addEventListener( 'DOMContentLoaded', cmxform, false);

function cmxform(){
// Hide forms
$( 'form.cmxform' ).hide().end();

// Processing
$( 'form.cmxform' ).find( 'li/label' ).not( '.nocmx' ) »
.each( function( i ){
var labelContent = this.innerHTML;
var labelWidth = document.defaultView. »
getComputedStyle( this, '' ).getPropertyValue( 'width' );
var labelSpan = document.createElement( 'span' );
labelSpan.style.display = 'block';
labelSpan.style.width = labelWidth;
labelSpan.innerHTML = labelContent;
this.style.display = '-moz-inline-box';
this.innerHTML = null;
this.appendChild( labelSpan );
} ).end();

// Show forms
$( 'form.cmxform' ).show().end();
}


Is this also the fix for my situation? If yes, how do I apply to my website?
Obviously my form does not have a name, let alone "form.cmxform"...

#24 greg

greg

    Jedi In Training

  • Members
  • PipPip
  • 499 posts
  • Location:New York City
  • Interests:Fine art, web and graphic design, naval architecture, chess, and sports.

Posted 08 September 2006 - 06:45 AM

You can probably fix it with CSS (if you're using it). You should at least try to before you try using more complicated PHP.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users