ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

remove div or vertical white space put in by exp:search ?

June 24, 2007 12:08pm

Subscribe [2]
  • #1 / Jun 24, 2007 12:08pm

    stevo_s

    176 posts

    Hi ,

    Is there anyway to remove the DIV tag that gets created when you put in a simple search box EE tag?
    maybe have it so it doesn’t create a div? - it messes up the layout of my page a bit, creating too much vertical white space above the search box.

    code:

    {exp:search:simple_form search_in="everywhere"}
    <input type="text" name="keywords" class="searchbox"  title="Type your search keyword here please"   />
    
    <input type=image src="button_go_inside.gif" width="38" height="18" border="0" class="button_go" />
    {/exp:search:simple_form}

    what gets created:

    <form method="post" action="index.php"  >
    <div>
    <input type="hidden" name="ACT" value="19" />
    <input type="hidden" name="XID" value="398c21a48766b228bae70468a02ae416281346ee" />
    <input type="hidden" name="RP" value="search/results" />
    <input type="hidden" name="NRP" value="" />
    <input type="hidden" name="RES" value="" />
    <input type="hidden" name="status" value="" />
    <input type="hidden" name="weblog" value="" />
    <input type="hidden" name="search_in" value="everywhere" />
    <input type="hidden" name="where" value="all" />
    <input type="hidden" name="site_id" value="1" />
    </div>
    
    
    <input type="text" name="keywords" class="searchbox"  title="Type your search keyword here please"   />
    
    <input type=image src="button_go.gif" width="38" height="18" border="0" class="button_go" />
    </form>
    </div>
  • #2 / Jun 24, 2007 5:43pm

    Derek Jones

    7561 posts

    The hidden inputs are put in a <div> to make the markup validate.  I typically null out padding and margin on a few tags as the first rules of my CSS, since each browser has their own defaults.

    div { padding: 0; margin: 0; }

    But if you only want it to apply here, then you can simply use:

    form div { padding: 0; margin: 0; }
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases