The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Absolute – Relative Positioning
I want to put #keyboard in the input element but it doesn’t work.
I tried to set the parent’s(#search) position to relative and the child(#keyboard) to absolute but the result is wrong.
You can’t put anything ‘in’ an input as it’s a self closing element.
The positioning you have is working exactly as you’ve told it too.
Do you have an image of what you are trying to achieve.
I want to replicate the Google Hompage. It has a keyboard icon within the search bar.
Google don’t use an inputthey use a div and a span with a bg image…just use ‘inspect element’ in your browsers developer tools (F12 usually) to inspect the code on that site.