Ask Dave Taylor
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube
  • Home
  • YouTube Channel
  • Most Popular
  • Newsletter!
  • Ask Me A Question
  • Meet Dave
  • Home
  • HTML & Web Page Design
  • Round Edges of Text Input Element in Web Form?

Round Edges of Text Input Element in Web Form?

September 12, 2017 / Dave Taylor / HTML & Web Page Design / No Comments

Now that Facebook has joined the move to having rounded edges in text input boxes, I want to do that too! I can get to the raw HTML on my pages, what do I need to change for this to happen?

  CLICK TO GET DAVE'S FREE NEWSLETTER! 
Guaranteed to Make you Smarter.

While support for the CSS style border-radius has been in Web browsers for years now, you’re right that the big sites are only just starting to take advantage of it. Seems like suddenly every designer wants their interface to look like it’s based on instant message or smartphone text chats with words in bubbles. Weird. I have no problems with actual corners on things, personally!

Fortunately, if you’re already reasonably familiar with the basics of HTML and how to add Cascading Style Sheet (CSS) attributes to individual elements, it’s easy to retrofit things. In fact, if you have a shared master style sheet for your Web site, you might be able to add a single line and have all your input boxes suddenly have rounded edges!

But let’s not get too far ahead of ourselves. At its most basic, HTML is <tag attribute=value>, often with a </tag> pair to denote a range but sometimes as a standalone element. For a text input element in an HTML form, as an example, that looks like this:

<input type=”text” name=”userinput”>

You need to wrap it within a form element, of course, but let’s slow down just a bit and start with the Facebook UI. As of the latest interface update, input boxes for comments now look like this:

facebook form - rounded input box edges

Pretty cool if you’re a fan of the rounded edge!

To explore how to code your own form to look like that, let’s do a simple task: A Twitter search bar. It’s easy enough to do a search on Twitter — for gryffindor — and ascertain that the fully qualified search URL is

https://twitter.com/search?q=gryffindor&src=typd

As with most online site search, you can chop out the name=value variables that don’t contain the actual search term, so all we really need from this is the target URL (everything to the left of the “?”) and the name of the name=value pair that has the search itself.

That translates quickly and easily into this HTML search form you can put on any Web page:

<form method=get action=”https://twitter.com/search”>
Search Twitter:
<input type=”text” name=”q” />
<input type=”submit” />
</form>

When we have the browser interpret the HTML it looks uninspired, but it does work:

Search Twitter:    

And now, finally, we can round the corners. That’d done by adding some CSS to the actual input element that produces the text input box, and revolves around border-radius. Let’s make it big and start with a reasonably subtle corner: 10 pixels, or 10px:

<form method=get action=”https://twitter.com/search”>
Search Twitter:
<input type=”text” name=”q” style=”border-radius:5px” />
<input type=”submit” />
</form>

That formats thusly:

Search Twitter:    

Let’s change that 5px to a 15px and also add a border-radius to the submit button element too and see what happens!

Search Twitter:    

So there ya have it. Add style=”border:radius:25px” or similar to your own form input elements and you’ll have slick, rounded edges that’ll make all your forms look oh, so modern.

About the Author: Dave Taylor has been involved with the online world since the early days of the Internet. Author of over 20 technical books, he runs the popular AskDaveTaylor.com tech help site. You can also find his gadget reviews on YouTube and chat with him on Twitter as @DaveTaylor.

Let’s Stay In Touch!

Never miss a single article, review or tutorial here on AskDaveTaylor, sign up for my fun weekly newsletter!
Name: 
Your email address:*
Please enter all required fields
Correct invalid entries
No spam, ever. Promise. Powered by FeedBlitz
Please choose a color:
Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!
facebook design, round corners, rounded corners, ui design, user interface design, web form, web form design

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Recent Posts

  • Share Contact Info Cards Between iPhone and Android?
  • How Do Virtual Private Networks (VPNs) Protect my Privacy?
  • How to Use AI To Identify the Setting of a Photograph
  • What Software Do I Need to Play DVDs on my Windows PC?
  • Is Your Cloud Storage Full? Nope, it’s Spam.

On Our YouTube Channel

A Beautiful Listen: The Onkyo Creator Series GX-30ARC Powered Monitors

Hear Everything with the EKSA Telecom S30 AI-Powered Open Ear Headset

Categories

  • AdSense, AdWords, and PPC Help (106)
  • AI and ChatGPT Help (57)
  • Alexa, Kindle, and Nook Help (105)
  • Amazon, eBay, and Online Shopping Help (172)
  • Android Help (296)
  • Apple iPad Help (156)
  • Apple Watch & Smartwatch Help (63)
  • Articles, Tutorials, and Reviews (361)
  • Auto Tech Help (26)
  • Business Advice (202)
  • Chromebook & ChromeOS Help (74)
  • Computer & Internet Basics (834)
  • d) None of the Above (170)
  • Facebook Help (397)
  • Google, Chrome & Gmail Help (215)
  • HTML & Web Page Design (249)
  • Instagram, Bluesky & Threads Help (65)
  • iPhone & iOS Help (692)
  • iPod & MP3 Player Help (173)
  • LinkedIn Help (95)
  • Linux Help (182)
  • Linux Shell Script Programming (93)
  • Mac & MacOS Help (980)
  • Most Popular (16)
  • Outlook & Office 365 Help (49)
  • PayPal Help (69)
  • Pinterest Help (58)
  • Reddit Help (23)
  • SEO & Marketing (83)
  • Spam, Scams & Security (123)
  • Trade Show News & Updates (23)
  • Video Game Tips (66)
  • Web Site Traffic Tips (62)
  • Windows PC Help (1,059)
  • Wordpress Help (207)
  • Writing and Publishing (72)
  • X/Twitter Help (230)
  • YouTube Help (52)
  • YouTube Video Reviews (159)
  • Zoom, Skype & Video Chat Help (75)

Archives

Social Connections:

Ask Dave Taylor


Follow Me on Pinterest
Follow me on Twitter
Follow me on LinkedIn
Follow me on Instagram


AskDaveTaylor on Facebook



microsoft insider mvp


This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to our terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. Our lawyer says "Thanks for your cooperation."
© 2025 by Dave Taylor. "Ask Dave Taylor®" is a registered trademark of Intuitive Stories, LLC.
FTC Notice: If you buy products through links on this site we may receive a modest affiliate commission. This won’t affect the price you pay.
Privacy Policy - Terms and Conditions - Accessibility Policy - Humix Video Content
  • Home
  • YouTube Channel
  • Most Popular
  • Newsletter!
  • Ask Me A Question
  • Meet Dave