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.

contact form styling question

Featured Replies

hey guys.

 

www.changemyworkout.com/contactus.php

 

i can't seem to style the contact form correctly so the labels are clearly on top of each other. any ideas? thanks in advance.

Try something like vertical-align: top; for input fields in your CSS code.

 

Alternatively, use tables.

Try using this

 

<form method="post" action="contactUs2.php">

<!-- PHP -->

<?php

$ipi = getenv("REMOTE_ADDR");

$httprefi = getenv ("HTTP_REFERER");

$httpagenti = getenv ("HTTP_USER_AGENT");

?>

<p class="form">

Name: *<br />

<input type="text" name="name" size="30" /><br />

Website:<br />

<input type="text" name="website" size="30" /><br />

Email: *<br />

<input type="text" name="visitormail" size="30" /><br />

Message: *<br />

<textarea name="notes" rows="9" cols="42">

 

 

 

</textarea>

<br />

<br />

<input type="submit" value="Send Mail" />

</p>

<p class="contacts">* = Required Fields</p>

</form>

Hi goldfingerler,

 

I've had a quick go at the source code, the below works in Firefox.. will probably work cross browser but I don't have time to test right now.

 

<form>
 <label>First Name:</label><input type="text" />
 <label>Last Name:</label><input type="text" />
 <label>E-mail Address:</label><input type="text" />
 <label>Comment:</label><input type="text" class="comment" />
</form>

 

.contactform input {
border:2px solid #18537F;
float:left;
margin-right:40px;
margin-top:10px;
width:150px;
}

.contactform input.comment{
height: 200px;
width: 190px;
margin-right:0;
}

.contactform label {
color:#FFFFFF;
float:left;
font-size:12px;
margin-top:10px;
text-align:left;
width:200px;
}

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.