Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CSS on Contact Form

Featured Replies

Hello

 

I'm having troubles with Two things on the contact page on my Online ePortfolio:

 

1) Border does not flow around legend

2) Fields turn grey when Hover and Clicked. I want them to stay white

 

I'd greatly appreciate any help.

 

Thank You.

The form tags have a background-image at the moment but contact_crazyleaf.gif doesn't seem to be available so I can see that they have a dark gray background on hover. Change the style to this and the hover background will be white unless the image is active:-

input:focus, input:hover,textarea:focus, textarea:hover{
border: 1px solid #000;
background: #fff url(../images/contact_crazyleaf.gif) top right no-repeat;
}

 

The legend always shows in the middle of the fieldset border; so you could try fiddling with the legend top margin or padding but I think you would be better to put a p tag inside the form and delete the legend if you want the fieldset border to run over the top of the text:-

 

...........<div id="contact"><form action="contact.php" method="POST">
<fieldset>
<!--<legend>Your Contact Information</legend>-->
<p>Your Contact Information</p>
<p style="margin-left:70px">..........

  • Author
The legend always shows in the middle of the fieldset border; so you could try fiddling with the legend top margin or padding but I think you would be better to put a p tag inside the form and delete the legend if you want the fieldset border to run over the top of the text:-

 

...........<div id="contact"><form action="contact.php" method="POST">
<fieldset>
<!--<legend>Your Contact Information</legend>-->
<p>Your Contact Information</p>
<p style="margin-left:70px">..........

 

If I do that .. I won't have them little tabs coming out of the body of the main form ... right ?

In your first post you said "1) Border does not flow around legend" so the legend sticks up partly above the fieldset border so my suggestion was to remove the legend and put a p tag inside the fieldset.

 

If you leave the legend as it is and give it borders to top and sides you can continue the fieldset border up around the legend that sticks up like a tab but you will find it difficult to set the legend at the right height; I've just tried and at first the side margins on the legend were above and below the adjacent fieldset border because the legend sat halfway through the fieldset border until I edited margin-top and inseted a conditional comment for different margin-top for IE.

 

legend { border-top: 2px solid red; border-left: 2px solid red;

border-right: 2px solid red; .............

 

Like this, which shows my first solution and the border around a legend:-

http://www.wickham43.com/forumposts/ciwancontact091116.html

CSS http://www.wickham43.com/forumposts/ciwandefault091116.css

 

but it isn't quite perfect in IE7.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.