Change Search Box Width
Permalink 1 user found helpful
I am fairly new to C5 but learning trial by fire.
I have a site pretty well built, and am trying to incorporate a search box into the right block, and the search box is too long. I don't understand how to customize the box, so it fits inside the right block? CSS? But where, and what?
Thanks in advance.
I have a site pretty well built, and am trying to incorporate a search box into the right block, and the search box is too long. I don't understand how to customize the box, so it fits inside the right block? CSS? But where, and what?
Thanks in advance.
Thanks Vijay.
Where do I add the attribute in the string? I need to change the width attribute in order to make the box smaller.
If I add a template, how do I apply it?
Where do I add the attribute in the string? I need to change the width attribute in order to make the box smaller.
If I add a template, how do I apply it?
Hi,
If you want to add a template, then you need to duplicate the view.php and find the below code
<input name="query" type="text" value="<?php echo htmlentities($query, ENT_COMPAT, APP_CHARSET)?>" />
and replace it with the below one
<input size="20" name="query" type="text" value="<?php echo htmlentities($query, ENT_COMPAT, APP_CHARSET)?>" />
or
<input style="width:100px;" name="query" type="text" value="<?php echo htmlentities($query, ENT_COMPAT, APP_CHARSET)?>" />
for more details about custom templates, please visit the given link
http://www.concrete5.org/documentation/how-tos/designers/customize-...
Thanks
Vijay
If you want to add a template, then you need to duplicate the view.php and find the below code
<input name="query" type="text" value="<?php echo htmlentities($query, ENT_COMPAT, APP_CHARSET)?>" />
and replace it with the below one
<input size="20" name="query" type="text" value="<?php echo htmlentities($query, ENT_COMPAT, APP_CHARSET)?>" />
or
<input style="width:100px;" name="query" type="text" value="<?php echo htmlentities($query, ENT_COMPAT, APP_CHARSET)?>" />
for more details about custom templates, please visit the given link
http://www.concrete5.org/documentation/how-tos/designers/customize-...
Thanks
Vijay
Thanks Vijay, I got it now!
How would I go about making it rounded? Like the concrete5 sites search?
Go to concrete/blocks/search/view.php and find this line
<input name="query" type="text" value="<?php echo htmlentities($query, ENT_COMPAT, APP_CHARSET)?>" />
and add size attribute or write css for this field, thats it you are done.
I recommend you to create a custom template rather than altering the code codings.
Thanks
Vijay