Note that there are some explanatory texts on larger screens.

plurals
  1. POtextfield with background image
    primarykey
    data
    text
    <p><img src="https://i.stack.imgur.com/A1e9K.jpg" alt="enter image description here"></p> <p>It must be a common issue but I really can't find any solutions for it. There is a textfield (texts will be written from right to left) and it has a curvy-side background image. The problem is the cursor must stay only in the red box area. </p> <p>The following is the four solutions I've come up with. <br/><br/><br/></p> <p>1 - <strong>Create a div with the background image and put a textfield in it.</strong></p> <p>Unless the textfield is transparent, it will cover the background image. Setting it transparent using CSS? I'm worried about some browsers not supporting it :(</p> <p><br/></p> <p>2 - <strong>Chop the background image into 3 parts(left - mid - right) and connect them all together. The textfield is positioned in the mid div.</strong></p> <p>This is okay... but the code will look messy :S ... :before :after selectors come in handy maybe? <br/><br/><br/> 3 - <strong>background image stays the same but the textfield size is decreased and positioned center.</strong></p> <p>This will be the best solution for it but clueless how to do.</p> <p><br/><br/><br/> 4 - <strong>Hey, WHY NOT JUST USE CSS3 ??</strong></p> <p>The background image has a company logo and this cannot be done with CSS... :(</p> <p>Would there be a better solution that supports all the browsers? :(</p> <p><br/><br/><br/><br/></p> <p>Code ---</p> <pre><code>&lt;div id="navigation" class="float-right"&gt; &lt;ul&gt; &lt;li&gt;&lt;?php echo anchor('.', 'HOME'); ?&gt;&lt;/li&gt; &lt;li&gt;&lt;?php echo anchor('company', 'COMPANY'); ?&gt;&lt;/li&gt; &lt;li&gt;&lt;?php echo anchor('#', 'PRODUCTS'); ?&gt;&lt;/li&gt; &lt;li&gt;&lt;?php echo anchor('#', 'SUPPORT'); ?&gt;&lt;/li&gt; &lt;li&gt;&lt;?php echo anchor('contact', 'CONTACT'); ?&gt;&lt;/li&gt; &lt;li&gt;&lt;input type="text"&gt;&lt;/input&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>CSS ---</p> <pre><code>#navigation ul li{ display: inline; } #navigation ul li input { background:url(../images/common/search_bar.jpg) no-repeat left top; width:113px; height:18px; border: 0px; text-align: right; outline: none; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload