- This topic has 8 replies, 4 voices, and was last updated 6 days, 8 hours ago by Tom.
February 23, 2021 at 12:29 am #1668745milan
Iam using GP Premium 1.12.3 and I would like to place some search icon to search field in widget in my theme.
Iam also using Fontawesome, loaded from CDN and I would like to use some of these icons or any other icon.
How to create this search field with this icon, like in this attachment?
Thanks for help.February 23, 2021 at 12:31 am #1668748milan
Attachment here: https://www.imgup.cz/image/kFZbFebruary 23, 2021 at 2:24 am #1668840DavidStaffCustomer SupportFebruary 23, 2021 at 3:30 am #1668904milan
Iam using Floats, because there are some problems with css styles…February 23, 2021 at 4:02 am #1668934DavidStaffCustomer SupportFebruary 23, 2021 at 9:33 am #1669482milan
So it is a little bit long story. But I have been moving my old theme to this one GP in my sites https://north-vietnam.com/ and https://severni-vietnam.cz/. This theme is fine, fast, everything is good, but in this process of moving to this theme, there have been various problems in my CSS (not styles in this theme). I try to change my very old theme to Flex structure in GP, but in Flex there have been various bad placing of my images, formating of texts, bad positions of images… But I tried to move to Float structure and there have been almost everything fine. Now Iam in Float structure, I tried to move this structure to Flex, and again the same problems by Css style… (e.g. different styling of images in css styles, bad position of search bar in navigation…)
Iam not sure, but what is better Flex or Float structure? Sorry Iam not a professional developer…February 23, 2021 at 5:50 pm #1669992ElvinStaffCustomer Support
Flexbox is definitely recommended over floats as float layout method is pretty old.
The more modern way of doing layout is usually a mix of Flexbox + Grid. (Flex for content alignment, Grid for general page layout). It’s definitely better in the long run over the legacy method (floats).
A wise man once said:
"Have you cleared your cache?"February 24, 2021 at 1:50 am #1670327milan
Ok, thanks, I will try to change it to Flexbox.
And in the Float structure it is not possible to add this icon by Fontawesome?February 24, 2021 at 10:44 am #1671043TomLead DeveloperLead Developer
It is possible, but it would require overwriting the
searchform.phptemplate file in your child theme: https://github.com/tomusborne/generatepress/blob/3.0.2/searchform.php
That way you could add the Font Awesome icon directly into the search button. It would also require some custom CSS which we’d be happy to help with when you get the above done.
- You must be logged in to reply to this topic.