Any idea why this code stopped working? (Wordpress)
My site - The main search bar 'city' 'neighborhood' 'min price' etc isn't responding, I can't input text and have no clue what I've done to bung it up.
The code seems to be clean though when I input it in the codepen, something on my site is mucking this up!
<form id="sp_search_w" action="http://www.codytritter.com/listing/" method="get">
<input name="sp" type="hidden" value="s" />
<label for="sp_city">City</label>
<input id="sp_city" class="btn-block" name="sp_city" type="text" placeholder="City" />
<label for="sp_subdivision">Sub Division</label>
<input id="sp_subdivision" class="btn-block" name="sp_subdivision" type="text" placeholder="Neighborhood" />
<label for="sp_minprice">Min. Price</label>
<input name="sp_minprice" type="text" placeholder="Min Price" />
<!--
<select name="sp_minprice" id="sp_minprice" class="btn-block">
<option value="0">No Min</option>
<option value="25000">25,000</option>
<option value="50000">50,000</option>
<option value="75000">75,000</option>
</select>
-->
<label for="sp_maxprice">Max. Price</label>
<input name="sp_maxprice" type="text" placeholder="Max Price" />
<!--
<select name="sp_maxprice" id="sp_maxprice" class="btn-block">
<option value="50000000">No Max</option>
<option value="25000">25,000</option>
<option value="50000">50,000</option>
<option value="75000">75,000</option>
</select>
-->
<label for="sp_bedrooms">Bedrooms</label>
<input class="short" name="sp_bedrooms" type="text" placeholder="Beds" />
<!--
<select name="sp_bedrooms" id="sp_bedrooms" class="input-small btn-block">
<option value="">All</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4+</option>
</select>
-->
<label for="sp_bathrooms">Bathroom</label>
<input class="short" name="sp_bathrooms" type="text" placeholder="Baths" />
<!--
<select name="sp_bathrooms" id="sp_bathrooms" class="input-small btn-block">
<option value="">All</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4+</option>
</select>
-->
<div class="controls">
<input id="sp_search_submit" class="btn" type="submit" value="Search" />
</div>
</form>
CSS
form {
max-width: 100%;
margin: auto;
text-align: center;
}
input {
text-align: center;
padding: 1rem 1rem;
border-radius: .5rem;
border: 2px solid #ddd;
font-size: 1.3em;
max-width: 8em;
}
.controls { padding: 1em 0 0; }
#sp_search_submit {
background: #809eb6;
border: 0;
color: #fff;
text-transform: uppercase;
letter-spacing: .2rem;
}
input:focus { outline: 0; }
.short { max-width: 4em; }
label { display: none; }
It's a CSS problem. There is a z-index of -1 on a parent element.
See this style
.post-489 .et_pb_section:nth-child(1) {
z-index: -1!important;
}
It's references in the head of your page
<!-- Start CSSHero.org Dynamic CSS & Fonts Loading -->
<link rel="stylesheet" type="text/css" media="all" href="http://www.codytritter.com?wpcss_action=show_css" data-apply-prefixfree />
<!-- End CSSHero.org Dynamic CSS & Fonts Loading -->
Related
I am trying to align the text on top of the input box without manually aligning it. Any pointers on how to do this?
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.6.1/dist/css/bootstrap.min.css">
<div class="select-vehicle">
<label for="exampleDataList" class="form-label">Select Plate number</label>
<input class="select-vehicle-list" list="plate-number-list" id="exampleDataList" placeholder="Plate number">
<datalist id="plate-number-list">
<option value="San Francisco">
<option value="New York">
<option value="Seattle">
<option value="Los Angeles">
<option value="Chicago">
</datalist>
</div>
Using the legend tag
You can use the fieldset + legend combo to get a similar effect using pure CSS. See the snippet below:
fieldset {
border-radius: 5px;
width: max-content;
border: 1px solid #D4D4D5;
}
legend {
font-size: 12px;
}
#exampleDataList {
width: 15rem;
border: none;
}
#exampleDataList:focus {
outline: none;
}
<fieldset>
<legend>Select Plate number</legend>
<div class="select-vehicle">
<input placeholder="Plate number" list="plate-number-list" id="exampleDataList">
<datalist id="plate-number-list">
<option value="San Francisco">
<option value="New York">
<option value="Seattle">
<option value="Los Angeles">
<option value="Chicago">
</datalist>
</div>
</fieldset>
Alternative
You can give label a relative position and move it towards the position like in the picture you have given. See the snippet below:
.select-vehicle {
display: flex;
flex-direction: column;
}
.form-label {
font-size: 12px;
position: relative;
background: #fff;
width: max-content;
padding-inline: 5px;
top: .5rem;
left: .8rem;
}
#exampleDataList {
width: 15rem;
padding: .8rem 1rem;
border: 1px solid #D4D4D5;
border-radius: 5px;
}
<div class="select-vehicle">
<label for="exampleDataList" class="form-label">Select Plate number</label>
<input placeholder="Plate number" list="plate-number-list" id="exampleDataList">
<datalist id="plate-number-list">
<option value="San Francisco">
<option value="New York">
<option value="Seattle">
<option value="Los Angeles">
<option value="Chicago">
</datalist>
</div>
More on css positions here.
In the title "legend" was mentioned and the pic resembles a <fieldset> and Bootstrap has foobared the fieldset to be unrecognizable. Here is the markup with BS classes for a fieldset that resembles a fieldset:
<fieldset class="border rounded p-2">
<legend class="float-none w-auto"></legend>
</fieldset>
I added .h6 and .mb-0 to the <legend> to decrease both font-size and margin-bottom. Are you sure you need a <label> or are you adding more form controls to the fieldset?
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style></style>
</head>
<body>
<main class="container">
<section class="row">
<form>
<fieldset class="border rounded p-2">
<legend class="float-none w-auto mb-0 h6">Select State of Registeration: </legend>
<input id='state' name="state" class="form-control" list="state-list" placeholder='State'>
<datalist id="state-list">
<option value="San Francisco">
<option value="New York">
<option value="Seattle">
<option value="Los Angeles">
<option value="Chicago">
</datalist>
</fieldset>
</form>
</section>
</main>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/js/bootstrap.bundle.min.js"></script>
<script></script>
</body>
</html>
I'm creating a mobile-first responsive website using forms. This is the desired mockup I need to create after 769px. https://ibb.co/LQ0Gwt7. Here is the desired mockup for 769px and below: https://ibb.co/7tbDShb
But why is that before 769px, the contents of my fieldset containers spill out?Whats causing this to happen? I put red borders around certain elements for clarity sake.
Take a look here: https://ibb.co/1J9n8pW
Here`s my CSS and HTML code:
* {
box-sizing: border-box;
}
body {
background: seashell;
font-family: 'Merriweather', serif;
}
.header-content {
text-align: center;
background: #29405a;
color: white;
border: 1px solid #29405a;
}
.signup {
text-align: center;
border-bottom: 2px #29405a dashed;
margin: 0 auto;
width: 90%;
}
.form {
margin: 10px auto;
width: 70%;
background: #feffff;
padding: 30px;
border-radius: 10px;
border: 1px red solid;
}
.field {
padding: 20px;
margin: 0 auto;
border: 3px red solid;
}
/*input styles*/
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
background: #e8eeef;
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03) inset;
border: none;
border-radius: 5px;
padding: 12px 0;
}
button[type="submit"] {
background: #52bab3;
color: #FFF;
padding: 10px 30px;
border: none;
border-radius: 5px;
cursor: pointer;
}
.news-input {
margin-bottom: 20px;
}
.news-input label {
margin-left: 10px;
}
.contact-input {
margin: 20px auto;
border: 1px red solid;
display: flex;
flex-wrap: wrap;
flex-direction: column;
}
.label {
margin-bottom: 10px;
}
.textarea {
display: flex;
flex-direction: column;
}
.button {
display: flex;
flex-direction: column;
}
.extra-info {
text-align: center;
}
#media (min-width: 768px) {
.contact-input {
display: flex;
flex-direction: row;
}
.label,
.input {
flex: 1;
}
.input {
flex: 3;
}
.zip-input,
.zip-label {
flex: 0;
flex-basis: 25%;
}
}
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8' />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Registration Form</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/styles.css">
<link href="https://fonts.googleapis.com/css?family=Merriweather&display=swap" rel="stylesheet">
</head>
<body>
<header>
<div class="header-content">
<h1>The Code Review</h1>
</div>
</header>
<div class="signup">
<h2>Sign up for our newsletter</h2>
<p>Get the latest news on how your code is doing right in your inbox</p>
</div>
<form action="index.html" get="post" class="form">
<fieldset class="field">
<legend>Contact Information</legend>
<div class="contact-input">
<label class="label" for="name">Name</label>
<input class="input" type="text" id="name" name="user_name">
</div>
<div class="contact-input">
<label class="label" for="mail">Email Address</label>
<input class="input" type="email" id="mail" name="user_email">
</div>
<div class="contact-input">
<label class="label" for="phone-number">Phone Number</label>
<input class="input" type="tel" id="phone-number" name="user_phone">
</div>
<div class="contact-input">
<label class="label" for="street">Street Address</label>
<input class="input" type="text" id="street" name="user_street">
</div>
<div class="contact-input">
<label class="label" for="city">City</label>
<input class="input" type="text" id="city" name="user_city">
</div>
<div class="contact-input">
<label class="label" for="state">State</label>
<select class="input" id="state" name="user_state">
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District Of Columbia</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="IA">Iowa</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="ME">Maine</option>
<option value="MD">Maryland</option>
<option value="MA">Massachusetts</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MS">Mississippi</option>
<option value="MO">Missouri</option>
<option value="MT">Montana</option>
<option value="NE">Nebraska</option>
<option value="NV">Nevada</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NY">New York</option>
<option value="NC">North Carolina</option>
<option value="ND">North Dakota</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VT">Vermont</option>
<option value="VA">Virginia</option>
<option value="WA">Washington</option>
<option value="WV">West Virginia</option>
<option value="WI">Wisconsin</option>
<option value="WY">Wyoming</option>
</select>
</div>
<div class="contact-input zip">
<label class="label zip-label" for="zip">Zip Code</label>
<input class="input zip-input" type="text" id="zip" name="user_zipcode">
</div>
</fieldset>
<fieldset class="field">
<legend>Newsletter</legend>
<p>Select the newspaper you'd like to recieve:</p>
<div class="news-input">
<input type="checkbox" id="html-news" name="user_htm-news" checked></input>
<label for="html-news">HTML News</label>
</div>
<div class="news-input">
<input type="checkbox" id="css-news" name="user_css-news">
<label for="css-news">CSS News</label>
</div>
<div class="news-input">
<input type="checkbox" id="javascript-news" name="user_javascript-news">
<label for="javascript-news">Javascript News</label>
</div>
<p>Newsletter Format</p>
<div class="news-input">
<input type="radio" id="html" name="user_newsletter-format" checked>
<label for="html">HTML</label>
</div>
<div class="news-input">
<input type="radio" id="css-news" name="user_newsletter-format">
<label for="css-news">CSS News</label>
</div>
<p>Other topics you'd like to hear about</p>
<div class="textarea">
<textarea id="topics" name="user_topics"></textarea>
</div>
</fieldset>
<div class="button">
<button type="submit">Sign Up</button>
</div>
<div class="extra-info">
<p>Copyright the Code Review</p>
</div>
</form>
</body>
</html>
On small screens you have to set
.form {
width: 100%;
}
otherwise the bigger components will overflow your too small .form div.
* {
box-sizing: border-box;
}
body {
background: seashell;
font-family: 'Merriweather', serif;
}
.header-content {
text-align: center;
background: #29405a;
color: white;
border: 1px solid #29405a;
}
.signup {
text-align: center;
border-bottom: 2px #29405a dashed;
margin: 0 auto;
width: 90%;
}
.form {
margin: 10px auto;
width: 100%; /* SET TO 100% */
background: #feffff;
padding: 30px;
border-radius: 10px;
border: 1px red solid;
}
.field {
padding: 20px;
margin: 0 auto;
border: 3px red solid;
}
/*input styles*/
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
background: #e8eeef;
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03) inset;
border: none;
border-radius: 5px;
padding: 12px 0;
}
button[type="submit"] {
background: #52bab3;
color: #FFF;
padding: 10px 30px;
border: none;
border-radius: 5px;
cursor: pointer;
}
.news-input {
margin-bottom: 20px;
}
.news-input label {
margin-left: 10px;
}
.contact-input {
margin: 20px auto;
border: 1px red solid;
display: flex;
flex-wrap: wrap;
flex-direction: column;
}
.label {
margin-bottom: 10px;
}
.textarea {
display: flex;
flex-direction: column;
}
.button {
display: flex;
flex-direction: column;
}
.extra-info {
text-align: center;
}
#media (min-width: 768px) {
.form{
width: 70%;
}
.contact-input {
display: flex;
flex-direction: row;
}
.label,
.input {
flex: 1;
}
.input {
flex: 3;
}
.zip-input,
.zip-label {
flex: 0;
flex-basis: 25%;
}
}
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8' />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Registration Form</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/styles.css">
<link href="https://fonts.googleapis.com/css?family=Merriweather&display=swap" rel="stylesheet">
</head>
<body>
<header>
<div class="header-content">
<h1>The Code Review</h1>
</div>
</header>
<div class="signup">
<h2>Sign up for our newsletter</h2>
<p>Get the latest news on how your code is doing right in your inbox</p>
</div>
<form action="index.html" get="post" class="form form_setter">
<fieldset class="field">
<legend>Contact Information</legend>
<div class="contact-input">
<label class="label" for="name">Name</label>
<input class="input" type="text" id="name" name="user_name">
</div>
<div class="contact-input">
<label class="label" for="mail">Email Address</label>
<input class="input" type="email" id="mail" name="user_email">
</div>
<div class="contact-input">
<label class="label" for="phone-number">Phone Number</label>
<input class="input" type="tel" id="phone-number" name="user_phone">
</div>
<div class="contact-input">
<label class="label" for="street">Street Address</label>
<input class="input" type="text" id="street" name="user_street">
</div>
<div class="contact-input">
<label class="label" for="city">City</label>
<input class="input" type="text" id="city" name="user_city">
</div>
<div class="contact-input">
<label class="label" for="state">State</label>
<select class="input" id="state" name="user_state">
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District Of Columbia</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="IA">Iowa</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="ME">Maine</option>
<option value="MD">Maryland</option>
<option value="MA">Massachusetts</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MS">Mississippi</option>
<option value="MO">Missouri</option>
<option value="MT">Montana</option>
<option value="NE">Nebraska</option>
<option value="NV">Nevada</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NY">New York</option>
<option value="NC">North Carolina</option>
<option value="ND">North Dakota</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VT">Vermont</option>
<option value="VA">Virginia</option>
<option value="WA">Washington</option>
<option value="WV">West Virginia</option>
<option value="WI">Wisconsin</option>
<option value="WY">Wyoming</option>
</select>
</div>
<div class="contact-input zip">
<label class="label zip-label" for="zip">Zip Code</label>
<input class="input zip-input" type="text" id="zip" name="user_zipcode">
</div>
</fieldset>
<fieldset class="field">
<legend>Newsletter</legend>
<p>Select the newspaper you'd like to recieve:</p>
<div class="news-input">
<input type="checkbox" id="html-news" name="user_htm-news" checked></input>
<label for="html-news">HTML News</label>
</div>
<div class="news-input">
<input type="checkbox" id="css-news" name="user_css-news">
<label for="css-news">CSS News</label>
</div>
<div class="news-input">
<input type="checkbox" id="javascript-news" name="user_javascript-news">
<label for="javascript-news">Javascript News</label>
</div>
<p>Newsletter Format</p>
<div class="news-input">
<input type="radio" id="html" name="user_newsletter-format" checked>
<label for="html">HTML</label>
</div>
<div class="news-input">
<input type="radio" id="css-news" name="user_newsletter-format">
<label for="css-news">CSS News</label>
</div>
<p>Other topics you'd like to hear about</p>
<div class="textarea">
<textarea id="topics" name="user_topics"></textarea>
</div>
</fieldset>
<div class="button">
<button type="submit">Sign Up</button>
</div>
<div class="extra-info">
<p>Copyright the Code Review</p>
</div>
</form>
</body>
</html>
Form inputs have a default width that the user agent (browser) applies unless you override it.
The size IDL attribute is limited to only non-negative numbers greater than zero and has a default value of 20.
The container for your form inputs is 70% the width of the viewport, once the viewport is small enough, 70% becomes less than the default width of the form inputs. Thus the overflow.
At larger viewport sizes you're using flexbox properties which causes the inputs to stretch a particular width of their containing element.
Apply width: 100%; to your form inputs.
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
width: 100%;
background: #e8eeef;
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03) inset;
border: none;
border-radius: 5px;
padding: 12px 0;
}
This would be your best approach, no need for media query:
.form {
width: 100%;
display: block;
margin-left: auto;
margin-right: auto;
max-width: 1024px; //insert your prefer value here;
}
Is that possible to create a new line (like <br/>in html ) inside of a previous form-row.
Here is what I have. I would like to put "Recherche" in a new line (but i still want to keep it inside the form-row div).
Do you have an idea ?
http://jsfiddle.net/aq9Laaew/96443/
Thanks !
Change the <form> class. Like this:
Old:
<form class="form-inline" name="formFiltre" id="formFiltre" method="post">
New:
<form class="form" name="formFiltre" id="formFiltre" method="post">
Working example:
.row {
background: #f8f9fa;
margin-top: 20px;
}
.col {
border: solid 1px #6c757d;
padding: 10px;
}
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<script src="http://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
<link href="http://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="http://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<div class="form-row">
<div class="col-lg-12">
<form class="form" name="formFiltre" id="formFiltre" method="post">
<input type="hidden" name="nav" value="1" />
<label for="recherche">Arborescence</label>
<select name="rf_arbo[0]" id="rf_arbo0" class="form-control rf_arbo" style="margin: 1%">
<option value="">-- choisir --</option>
<option value="7">Toutes</option>
<option value="2">Offre du moment</option>
<option value="6">Témoignages</option>
<option value="8">Loi de défiscalisation</option>
</select>
<!-- SAUT DE LIGNE -->
<label for="recherche">Recherche</label>
<input type="text" name="rf_recherche" id="rf_recherche" class="form-control" value="" style="margin: 1%" />
<select name="rf_statut" id="rf_statut" class="form-control" style="margin: 1%">
<option value="">-- statuts --</option>
<option value="v1">En ligne</option>
<option value="v0">Hors ligne</option>
</select>
<select name="rf_accueil" id="rf_accueil" class="form-control" style="margin: 1%">
<option value="">-- accueil --</option>
<option value="v1">Affiché</option>
<option value="v0">Non affiché</option>
</select>
<input type="submit" class="btn" value="Rechercher" />
</form>
</div>
</div>
So I'm trying to be able to keep everything where it is even on a a window re size.. an example of what I wish for is similar to face book's registration page (or any page on facebook for that matter... everything gets hidden behind the browser as i minimize its width). I've included two links one a jfiddle and second an actual test page:
https://jsfiddle.net/0nskvmjc/
http://sushionfir3.byethost7.com/test/register.php
here's the html for my own registration page
<!--background image-->
<style type="text/css">
body {
background-image: url(bg/bg.jpg);
background-size: cover;
}
</style>
<!---->
<body>
<!--top green transparent bar-->
<nav class="bar"></nav>
<div class="logo">
<img src="img/logo.png" height=90px>
</div>
<br />
<div class="login">Log in</div>
<div class="signin">
<form class="pure-form" action="#" method="post">
<input class="input" type="text" placeholder="Email">
<input class="input" type="password" placeholder="Password">
<button type="submit" class="button-sign pure-button">Sign in</button>
</form>
<!---->
<!--registration form start-->
<div id="reg_border"></div>
<div class="reg_form">
<h2 id="register_right">Registration is free and easy!</h2>
<div class="form_inputs">
<form class="pure-form" action="#" method="POST">
<input class="input" type="text" name="firstname" placeholder="First name" />
<input class="input" type="text" name="lastname" placeholder="Last name" /><br />
<input class="input" type="email" name="email" placeholder="Email" size="49" /><br />
<div class="space">
<input class="input" type="text" name="remail" placeholder="Please re-enter your Email" size="49" /><br />
</div>
<div class="space">
<input class="input" type="password" name="npassword" placeholder="New password" size="49" />
</div>
<p class="birthdate">Date of birth</p>
<div class="birthday_options">
<select class="months">
<option value="jan">Jan</option>
<option value="feb">Feb</option>
<option value="mar">Mar</option>
<option value="apr">Apr</option>
<option value="may">May</option>
<option value="jun">Jun</option>
<option value="jul">Jul</option>
<option value="aug">Aug</option>
<option value="sep">Sep</option>
<option value="oct">Oct</option>
<option value="nov">Nov</option>
<option value="dec">Dec</option>
</select>
<select class="days">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<input class="input" type="text" name="year" placeholder="mm/dd/yyyy" size="10" />
</div><!--birthdaymonths-->
<p class="sex">Gender</p>
<div class="genders">
<input type="radio" name="gender" value="1">Male</input>
<input type="radio" name="gender" value="2">Female</input>
</div>
<button id="signup" type="submit" class="button-sign pure-button">Sign up!</button>
</form>
</div><!--form_inputs-->
</div><!--reg_form-->
</body>
and here's the css for it
.bar {
width: 100%;
height: 90px;
background-color: rgba(0,160,135,0.4);
}
.logo {
margin-top: -88px;
padding-left: 50px;
}
.login {
text-align: right;
margin-top: -100px;
margin-right: 486px;
color: white;
}
.signin {
text-align: right;
padding-right: 50px;
padding-top: 5px
}
#reg_border {
background: rgba(0,160,135,0.4);
width: 32%;
height: 70%;
margin: 6% 1% 3% auto;
-webkit-border-radius: 70px;
-moz-border-radius: 70px;
-o-border-radius: 70px;
}
.reg_form {
text-align: right;
padding-right: 24px;
line-height: 48px;
margin-top: -525px;
}
.input {
line-height: 20px
}
#register_right {
padding-right: 29px;
padding-top: 30px
}
.birthdate {
margin: auto 310px auto 100px;
}
.birthday_options {
margin: -10px 125px auto 100px;
}
.sex {
margin: -5px 345px auto 100px;
}
.genders {
margin: -20px 265px auto auto;
}
.space {
margin-top: 4px
}
#signup {
width: 13em;
margin: 2px 95px auto auto
}
Thank you in advance. I've tried looking up these questions but none of the answers on other people's questions seem to work for me.. maybe the issue is within what I've already coded and adding extra bits of code isn't going to help or MAYBE it is, I'm not sure haha. Thank you again.
I GOT IT! For me, adding a min and max width of 1366px did the trick!
<style type="text/css">
body, html {
background-image: url(bg/bg.jpg);
background-size: cover;
width: 100%;
height: 100%;
min-width: 1366px;
margin: auto auto;
max-width: 1366px;
}
</style>
I'm somewhat satisfied with its current result, however, still open for a better way :)
I'm working on an app and part of the project requirements is that the entire site be compatible with IE6 - IE8. So far, the rest of the website looks good on older browsers except for this search form I created.
This is what it looks like on modern browsers, and is what it's supposed to look like in general: ,
...but this is what it looks like on IE6: .
Does anyone have some experience with trying to make table-less layouts work on older browsers, or has run into a similar issue in the past? Basically I have containers holding each label / input, and need them to display next to each other in three's per row, with the label and input next to each other ass seen on the first image.
Below is the code regarding these elements.
EDIT: I added a few more things to both the html and css for easier deployment on your own computers.
Thanks for any help you can provide!
HTML
<div class="mid">
<h2>Search and filter by:</h2>
<!-- 1st Row Starts -->
<form action="" method="post" id="main-search-form"> <!-- containing form for search -->
<div id="search-container" align="center">
<div class="search" align="center">
<form>
<label>Keywords</label>
<input type="text" name="keywords" value="" id="keywords" placeholder="enter search terms here...">
</form>
</div>
<div class="search" align="center">
<label>Category</label>
<select>
<option value="" disabled selected>Select Category</option>
<option value="">Category 1</option>
<option value="">Category 2</option>
<option value="">Category 3</option>
<option value="">Category 4</option>
<option value="">Category 5</option>
</select>
</div>
<div class="search" align="center">
<label>Service</label>
<select>
<option value="" disabled selected>Select Service</option>
<option value="food">Food and Nutrition Support</option>
<option value="shelter">Shelter and Care</option>
<option value="protection">Protection</option>
<option value="healthcare">Healthcare</option>
<option value="pyschosocial">Psychosocial Support Services</option>
<option value="education">Formal and informal education</option>
<option value="legal">Legal Services</option>
<option value="other">Other Services</option>
</select>
</div>
</div> <!-- //.search-container -->
<!-- // 1st Row -->
<!-- 2nd Row Starts -->
<div id="search-container" align="center">
<div class="search" align="center">
<label>Age</label>
<select>
<option value="" disabled selected>Select Age</option>
<option value="">Age 1-3</option>
<option value="">Age 4-10</option>
<option value="">Age 11-14</option>
<option value="">Age 15-18</option>
</select>
</div>
<div class="search" align="center">
<label>Gender</label>
<select>
<option value="" disabled selected>Select Gender</option>
<option value="male">Male</option>
<option value="female">Female</option>
</select>
</div>
<div class="search" align="center">
<label>Region</label>
<select>
<option value="" disabled selected>Select Region</option>
<option value="">Category 1</option>
<option value="">Category 2</option>
<option value="">Category 3</option>
<option value="">Category 4</option>
<option value="">Category 5</option>
</select>
</div>
</div><!-- //.search-container -->
<!-- // 2nd Row -->
<!-- 3rd Row Starts Here -->
<div class="search-container" align="center">
<div class="search" align="center">
<form class="checkbox">
<label>Day</label>
<input type="checkbox" name="monday" value="Monday">M
<input type="checkbox" name="tuesday" value="Tuesday">T
<input type="checkbox" name="wednesday" value="Wednesday">W
<input type="checkbox" name="thursday" value="Thursday">R
<input type="checkbox" name="friday" value="Friday">F
<input type="checkbox" name="saturday" value="Saturday" >Sa
<input type="checkbox" name="sunday" value="Tuesday">Su
</form>
</div>
</div>
</form>
</div>
CSS
.mid {background: #258db1; color: #fff; padding: 20px 0 30px 0;}
.mid h2 {color: #fff; text-align: center;}
.mid h2, .mid h3, .mid p, .footnote p {color:#fff;}
/* SEARCH */
#main-search-form {width: 100%;}
.search {min-width: 250px; display: inline; margin:0; position:relative;}
.search select {background: #fff; height: 40px; width: 150px; margin-bottom: 30px; margin-right: 30px; position:relative; display: inline;}
.search option, {padding: 10px; position:relative; display: inline;}
.search, .search label {display: inline;}
.search input#keywords {display: inline; position: relative; min-width: 250px; background: #fff; margin-right: 20px;}
.search .checkbox input {display: inline; position: relative; width: 15px!important; height: 15px!important; margin-left: 10px!important; margin-right: 2px!important;}
.search .checkbox label {display: inline; position: relative; margin-right: 10px;}
#media (max-width: 959px) {
.search {disply: block; clear:both;}
.search input, .search select, .search input#keywords {display:block; margin-bottom: 20px; margin-top: 8px; width: 60%!important; margin-left:30px;}
.search, .search label, .search input#keywords {display: block; clear:both;}
}
Remove align='center' attribute in #search