Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Absolute – Relative Positioning

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #185712
    GSG
    Participant

    http://codepen.io/gsg/pen/wGxmi

    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.

    #185713
    Paulie_D
    Member

    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.

    http://codepen.io/Paulie-D/pen/wjHfB

    Do you have an image of what you are trying to achieve.

    #185714
    GSG
    Participant

    I want to replicate the Google Hompage. It has a keyboard icon within the search bar.

    #185776
    Paulie_D
    Member

    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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.