Why is the input taking up 2 spaces? - html

I have a problem with my input.
As you can see, my input is taking up too much space. It doesn't have margin or padding.
Here's my code (I am using Boilerplate v5.3.0).
How can I fix it so it just takes the space that it needs?
$(document).ready(function() {
$('.selectList').hide();
$('.selectorWrapper a').click(function() {
hideShow(this);
});
$('ul.selectList li').click(function() {
changeText(this);
validate();
});
$('#email').keydown(function() {
var correo = $('#email').val();
if (validateMail(correo)) {
$('#email').css('borderColor', '#87e466');
validate();
} else {
$('#email').css('borderColor', '#ca3535');
validate();
}
});
function validateMail(email) {
var re = /^(([^<>()\[\]\\.,;:\s#"]+(\.[^<>()\[\]\\.,;:\s#"]+)*)|(".+"))#((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
console.log(re.test(email));
return re.test(email);
}
function validate() {
var select1 = $('#selection1').text();
var select2 = $('#selection2').text();
var select3 = $('#selection3').val();
var email = $('#email').val();
if (select1 != 'Marca' && select2 != 'Modelo' && select3 != 'Anio' && validateMail(email)) {
$('#submitBtn').css({
'backgroundColor': '#bbd550',
'boxShadow': '0px 3px 0px 0px #9fbc2d'
});
$('#submitBtn').removeClass('disableClick');
} else {
$('#submitBtn').css({
'backgroundColor': '#808080',
'boxShadow': '0px 3px 0px 0px #636161'
});
$('#submitBtn').addClass('disableClick');
}
}
function hideShow(element) {
var thisId = $(element).attr('id');
var isHidden = $('#' + thisId).next().css('display');
console.log(isHidden);
if (isHidden == 'none') {
$('#' + thisId).next().slideDown();
} else {
$('#' + thisId).next().slideUp();
}
}
function changeText(element) {
var text = $(element).text();
$(element).parent().prev().text(text);
$(element).parent().prev().append('<i class="fa fa-chevron-down"></i>');
$(element).parent().slideUp();
$(element).parent().prev().css('borderColor', '#87e466')
}
});
html {
margin: 0;
padding: 0;
box-sizing: border-box;
}
input {
outline: none;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
margin: 0;
padding: 0;
font-family: 'Open Sans', sans-serif;
}
.disableClick {
pointer-events: none;
}
label {
display: none;
}
h3,
h2 {
margin: 0 auto;
padding: 0;
font-family: 'Open Sans', sans-serif;
}
header.site-header {
background-color: #000000;
width: 100%;
}
header.site-header h3 {
text-align: center;
color: #ffffff;
padding: 15px 0;
font-weight: normal;
font-size: 30px;
}
header.site-header h3 span {
font-weight: bold;
}
div.banner {
border-bottom: 5px solid #36aadd;
}
div.banner h2 {
font-size: 2em;
text-align: center;
font-weight: bold;
color: #36aadd;
padding: 15px 10px 10px 10px;
}
div.banner p {
color: #888888;
text-align: center;
margin: 0;
font-size: 1.2em;
padding-bottom: 50px;
font-family: 'Open Sans', sans-serif;
}
div.form {
padding: 20px 10px;
margin: 0;
background-color: #eeeeee;
}
a.selectButton {
text-decoration: none;
padding: 10px;
color: #888888;
background-color: #ffffff;
border: 1px solid #d0d0d0;
display: block;
width: 100%;
margin: 0;
}
a.selectButton i {
color: #d0d0d0;
float: right;
padding-right: 10px;
}
ul.selectList {
list-style: none;
padding: 0;
margin: 0;
border: 1px solid #d0d0d0;
width: 100%;
position: absolute;
}
ul.selectList li {
width: 100%;
padding: 10px 0 10px 10px;
display: block;
background-color: #ffffff;
}
ul.selectList li a {
display: block;
text-decoration: none;
color: #888888;
}
ul.selectList li:hover {
background-color: #d0d0d0;
}
div.selectorWrapper input {
margin: 0;
padding: 10px;
width: 100%;
border: 1px solid #d0d0d0;
border-top: none;
text-align: center;
font-family: 'Open Sans', sans-serif;
}
div.selectorWrapper {
/*width:100%;*/
}
.selectorWrapper:nth-child(2),
.selectorWrapper:nth-child(3) {
width: 50%;
float: left;
}
div.selectorWrapper .button {
background-color: #808080;
color: #FFFFFF;
margin-top: 30px;
border-radius: 4px;
margin-bottom: 20px;
font-size: 30px;
box-shadow: 0px 3px 0px 0px #636161;
border: none;
font-family: 'Open Sans', sans-serif;
}
div.recuperar {
text-align: center;
padding: 20px;
}
div.recuperar a.recupera-link {
text-decoration: none;
color: #5faadb;
font-size: 18px;
font-family: 'Open Sans', sans-serif;
}
.contenedorA {
position: relative;
}
#media only screen and (min-width: 768px) {
label {
display: block;
width: 30%;
float: left;
padding: 10px 0 0 15px;
text-align: left;
font-size: 0.9em;
}
div.banner {
border: none;
}
div.form {
background: #ffffff;
}
.contenedorA {
padding: 100px 50px 0 50px;
}
.contenedor {
width: 96%;
margin: 0 auto!important;
box-shadow: 0px 0px 10px 3px #f9f9f9;
margin-top: 50px;
}
div.selectorWrapper {
width: 80%;
margin: 20px auto;
}
div.selectorWrapper input,
div.selectorWrapper a.selectButton {
width: 70%;
float: right;
margin: 0 auto;
}
.selectorWrapper:nth-child(2),
.selectorWrapper:nth-child(3) {
width: 80%;
float: none;
position: relative;
}
ul.selectList {
position: relative;
margin-left: 420px;
margin-top: 44px;
}
div.selectorWrapper input {
border: 1px solid #d0d0d0;
}
div.recuperar {
padding-left: 100px;
}
}
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link rel='stylesheet' href='css/main.css' type="text/css">
<!--<link rel='stylesheet' href='css/normalize.css' type="text/css">-->
</head>
<body>
<header class='site-header'>
<h3><span>compara</span>online</h3>
</header>
<div class=contenedorA>
<div class="contenedor">
<div class="banner">
<h2>Cotiza tu Seguro Automotriz</h2>
<p>Resultados instantaneos!</p>
</div>
<div class="form clearfix">
<form method="post" action="">
<div class="selectorWrapper clearfix">
<label>Marca : </label>
<a class="selectButton" id="selection1" href="#">Marca<i class="fa fa-chevron-down"></i></a>
<ul class="selectList">
<li>Hyundai</li>
<li>Toyota</li>
<li>Nissan</li>
</ul>
</div>
<div class="selectorWrapper clearfix">
<label>Modelo : </label>
<a class="selectButton" id="selection2" href="#">Modelo<i class="fa fa-chevron-down"></i></a>
<ul class="selectList">
<li>Sedan</li>
<li>SUV</li>
<li>Pick-up</li>
</ul>
</div>
<div class="selectorWrapper clearfix">
<label>Anio: </label>
<a class="selectButton" id="selection3" href="#">Anio<i class="fa fa-chevron-down"></i></a>
<ul class="selectList">
<li>2017</li>
<li>2016</li>
<li>2015</li>
</ul>
</div>
<div class="selectorWrapper clearfix">
<!--<label>Email : </label>-->
<input type='email' name='email' class="clearfix" id='email' placeholder='Email' required>
</div>
<div class="selectorWrapper clearfix">
<input type='submit' class="button disableClick" id='submitBtn' value="Cotizar">
</div>
</form>
<div class="recuperar">
<a class="recupera-link" href="#">Recuperar cotizacion</a>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.min.js" type="text/javascript"></script>
<script src='js/main.js' type="text/javascript"></script>

When you float an element, you remove it from the normal flow of the document. As a result, other block elements don't respect their space.
Since both elements on the line (Modelo and Anio) are float: left, the next block element (Email) doesn't see them, and takes their space. So the Email div now lies hidden under the split elements.
However, the input element inside the Email div is not a block element. It's an inline element, by default. And inline elements respect the space of floated elements. (This is how text is able to wrap around floated images.)
So in your code, while the Email div shifts below the split element (on the z-axis), the input inside the Email div stays below the split element (on the y-axis).
When you highlight the Email element in dev tools, it illustrates this split across two rows.
One solution is to give the Email div display: inline-block and width: 100%.
div.selectorWrapper:nth-child(4) {
display: inline-block;
width: 100%;
}
Another solution is to add clear: both to the Email div. (Read more about clearing floats.)
div.selectorWrapper:nth-child(4) {
clear: both;
}
$(document).ready(function() {
$('.selectList').hide();
$('.selectorWrapper a').click(function() {
hideShow(this);
});
$('ul.selectList li').click(function() {
changeText(this);
validate();
});
$('#email').keydown(function() {
var correo = $('#email').val();
if (validateMail(correo)) {
$('#email').css('borderColor', '#87e466');
validate();
} else {
$('#email').css('borderColor', '#ca3535');
validate();
}
});
function validateMail(email) {
var re = /^(([^<>()\[\]\\.,;:\s#"]+(\.[^<>()\[\]\\.,;:\s#"]+)*)|(".+"))#((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
console.log(re.test(email));
return re.test(email);
}
function validate() {
var select1 = $('#selection1').text();
var select2 = $('#selection2').text();
var select3 = $('#selection3').val();
var email = $('#email').val();
if (select1 != 'Marca' && select2 != 'Modelo' && select3 != 'Anio' && validateMail(email)) {
$('#submitBtn').css({
'backgroundColor': '#bbd550',
'boxShadow': '0px 3px 0px 0px #9fbc2d'
});
$('#submitBtn').removeClass('disableClick');
} else {
$('#submitBtn').css({
'backgroundColor': '#808080',
'boxShadow': '0px 3px 0px 0px #636161'
});
$('#submitBtn').addClass('disableClick');
}
}
function hideShow(element) {
var thisId = $(element).attr('id');
var isHidden = $('#' + thisId).next().css('display');
console.log(isHidden);
if (isHidden == 'none') {
$('#' + thisId).next().slideDown();
} else {
$('#' + thisId).next().slideUp();
}
}
function changeText(element) {
var text = $(element).text();
$(element).parent().prev().text(text);
$(element).parent().prev().append('<i class="fa fa-chevron-down"></i>');
$(element).parent().slideUp();
$(element).parent().prev().css('borderColor', '#87e466')
}
});
div.selectorWrapper:nth-child(4) {
clear: both;
}
html {
margin: 0;
padding: 0;
box-sizing: border-box;
}
input {
outline: none;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
margin: 0;
padding: 0;
font-family: 'Open Sans', sans-serif;
}
.disableClick {
pointer-events: none;
}
label {
display: none;
}
h3,
h2 {
margin: 0 auto;
padding: 0;
font-family: 'Open Sans', sans-serif;
}
header.site-header {
background-color: #000000;
width: 100%;
}
header.site-header h3 {
text-align: center;
color: #ffffff;
padding: 15px 0;
font-weight: normal;
font-size: 30px;
}
header.site-header h3 span {
font-weight: bold;
}
div.banner {
border-bottom: 5px solid #36aadd;
}
div.banner h2 {
font-size: 2em;
text-align: center;
font-weight: bold;
color: #36aadd;
padding: 15px 10px 10px 10px;
}
div.banner p {
color: #888888;
text-align: center;
margin: 0;
font-size: 1.2em;
padding-bottom: 50px;
font-family: 'Open Sans', sans-serif;
}
div.form {
padding: 20px 10px;
margin: 0;
background-color: #eeeeee;
}
a.selectButton {
text-decoration: none;
padding: 10px;
color: #888888;
background-color: #ffffff;
border: 1px solid #d0d0d0;
display: block;
width: 100%;
margin: 0;
}
a.selectButton i {
color: #d0d0d0;
float: right;
padding-right: 10px;
}
ul.selectList {
list-style: none;
padding: 0;
margin: 0;
border: 1px solid #d0d0d0;
width: 100%;
position: absolute;
}
ul.selectList li {
width: 100%;
padding: 10px 0 10px 10px;
display: block;
background-color: #ffffff;
}
ul.selectList li a {
display: block;
text-decoration: none;
color: #888888;
}
ul.selectList li:hover {
background-color: #d0d0d0;
}
div.selectorWrapper input {
margin: 0;
padding: 10px;
width: 100%;
border: 1px solid #d0d0d0;
border-top: none;
text-align: center;
font-family: 'Open Sans', sans-serif;
}
div.selectorWrapper {
/*width:100%;*/
}
.selectorWrapper:nth-child(2),
.selectorWrapper:nth-child(3) {
width: 50%;
float: left;
}
div.selectorWrapper .button {
background-color: #808080;
color: #FFFFFF;
margin-top: 30px;
border-radius: 4px;
margin-bottom: 20px;
font-size: 30px;
box-shadow: 0px 3px 0px 0px #636161;
border: none;
font-family: 'Open Sans', sans-serif;
}
div.recuperar {
text-align: center;
padding: 20px;
}
div.recuperar a.recupera-link {
text-decoration: none;
color: #5faadb;
font-size: 18px;
font-family: 'Open Sans', sans-serif;
}
.contenedorA {
position: relative;
}
#media only screen and (min-width: 768px) {
label {
display: block;
width: 30%;
float: left;
padding: 10px 0 0 15px;
text-align: left;
font-size: 0.9em;
}
div.banner {
border: none;
}
div.form {
background: #ffffff;
}
.contenedorA {
padding: 100px 50px 0 50px;
}
.contenedor {
width: 96%;
margin: 0 auto!important;
box-shadow: 0px 0px 10px 3px #f9f9f9;
margin-top: 50px;
}
div.selectorWrapper {
width: 80%;
margin: 20px auto;
}
div.selectorWrapper input,
div.selectorWrapper a.selectButton {
width: 70%;
float: right;
margin: 0 auto;
}
.selectorWrapper:nth-child(2),
.selectorWrapper:nth-child(3) {
width: 80%;
float: none;
position: relative;
}
ul.selectList {
position: relative;
margin-left: 420px;
margin-top: 44px;
}
div.selectorWrapper input {
border: 1px solid #d0d0d0;
}
div.recuperar {
padding-left: 100px;
}
}
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link rel='stylesheet' href='css/main.css' type="text/css">
<!--<link rel='stylesheet' href='css/normalize.css' type="text/css">-->
</head>
<body>
<header class='site-header'>
<h3><span>compara</span>online</h3>
</header>
<div class=contenedorA>
<div class="contenedor">
<div class="banner">
<h2>Cotiza tu Seguro Automotriz</h2>
<p>Resultados instantaneos!</p>
</div>
<div class="form clearfix">
<form method="post" action="">
<div class="selectorWrapper clearfix">
<label>Marca : </label>
<a class="selectButton" id="selection1" href="#">Marca<i class="fa fa-chevron-down"></i></a>
<ul class="selectList">
<li>Hyundai</li>
<li>Toyota</li>
<li>Nissan</li>
</ul>
</div>
<div class="selectorWrapper clearfix">
<label>Modelo : </label>
<a class="selectButton" id="selection2" href="#">Modelo<i class="fa fa-chevron-down"></i></a>
<ul class="selectList">
<li>Sedan</li>
<li>SUV</li>
<li>Pick-up</li>
</ul>
</div>
<div class="selectorWrapper clearfix">
<label>Anio: </label>
<a class="selectButton" id="selection3" href="#">Anio<i class="fa fa-chevron-down"></i></a>
<ul class="selectList">
<li>2017</li>
<li>2016</li>
<li>2015</li>
</ul>
</div>
<div class="selectorWrapper clearfix">
<!--<label>Email : </label>-->
<input type='email' name='email' class="clearfix" id='email' placeholder='Email' required>
</div>
<div class="selectorWrapper clearfix">
<input type='submit' class="button disableClick" id='submitBtn' value="Cotizar">
</div>
</form>
<div class="recuperar">
<a class="recupera-link" href="#">Recuperar cotizacion</a>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.min.js" type="text/javascript"></script>
<script src='js/main.js' type="text/javascript"></script>

In your question you are showing the properties of div, check properties of a tag inside div. The a tag is having padding:10px;.

This is happening because a.selectButton has padding of 10px. You can remove it completely or you can only remove the left padding to fix the problem.
a.selectButton {
padding-left: 0;
}
Insert the above code in your style tag to fix the problem.

Related

HTML elements won't align properly on mobile

The html elements on this simple to do list app i'm making won't properly align themselves when ran on mobile. Essentially when on mobile, the h1 tag should be in the center of the screen as well as the input box and add button under it and the tasks being added to the page, instead on mobile everything is off alignment. Any fixes?
let task;
let text;
let addTask;
let list;
let taskNo = 0;
let remove;
let input = document.getElementById('message');
let btn = document.getElementById('btn');
input.addEventListener("keypress", function() {
if (event.keyCode == 13) {
if (input.value === "") {
alert("Please enter a task!");
} else {
createTask();
}
}
});
btn.onclick = function() {
if (input.value === "") {
alert("Please enter a task!");
} else {
createTask();
}
};
function createTask() {
task = input.value;
addTask = document.createElement('li');
text = document.createTextNode(task);
addTask.appendChild(text);
addTask.classList.add("task");
taskNo++;
addTask.id = taskNo;
document.getElementById("taskList").appendChild(addTask);
input.value = "";
let list = document.getElementsByClassName("task");
[...list].forEach(b => {
b.addEventListener("click", () => {
remove = document.getElementById(b.id);
remove.parentNode.removeChild(remove);
});
});
}
html, body{
margin: 0;
padding: 0;
}
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
background-color: #29313d;
color: white;
}
#container {
width: 100%;
}
h1{
text-align: center;
font-size: 44px;
}
#input{
margin: auto;
text-align: center;
}
#message, #btn{
display: inline-block;
height: 100%;
margin-top: 10px;
padding: 0;
float: left;
-webkit-box-sizing: border-box;
}
#message{
background-color: #333;
color: white;
border: 4px solid coral;
padding-left: 10px;
width: 75%;
height: 50px;
border-radius: 10px;
}
#btn{
font-size: 20px;
background-color: coral;
border: 4px solid coral;
color: black;
margin-left: 5%;
width: 20%;
height: 50px;
border-radius: 10px;
}
#btn:focus{
outline: none;
}
#message:focus{
outline: none;
}
#input{
height: 50px;
width: 400px;
}
#taskList{
list-style-type: none;
padding: 0;
margin-top: 50px;
}
.task {
margin: auto;
width: 85%;
margin-top: 5px;
padding: 10px;
border: 4px solid coral;
background-color: #333;
color: white;
border-radius: 10px;
}
#media(max-width: 600px) {
#container {
width: 80%;
}
h1{
margin: auto;
}
#message{
width: 100%;
}
#btn{
display: none;
}
.task{
width: 100%;
margin-left: 0;
margin-right: 0;
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=10">
<link href="resources/style.css" rel="stylesheet" type="text/css">
<link href="resources/logo.png" rel="shortcut icon" type="image/png">
<title>Jennis App</title>
</head>
<body>
<div id="container">
<h1>To Do List</h1>
<div id="input">
<div class="input-group">
<input type="text" id="message" placeholder="Please enter a new task">
</div>
<div class="input-group">
<input type="button" id="btn" value="Add">
</div>
</div>
<ul id="taskList">
</ul>
</div>
<script src="resources/code.js" type="text/javascript"></script>
</body>
</html>
you need to make some css changes in media.
Center the container for small device using margin
Remove display: none for #btn in media query
Use flex to align add button for small device
clearfix the .input-group using before and after
let task;
let text;
let addTask;
let list;
let taskNo = 0;
let remove;
let input = document.getElementById('message');
let btn = document.getElementById('btn');
input.addEventListener("keypress", function() {
if (event.keyCode == 13) {
if (input.value === "") {
alert("Please enter a task!");
} else {
createTask();
}
}
});
btn.onclick = function() {
if (input.value === "") {
alert("Please enter a task!");
} else {
createTask();
}
};
function createTask() {
task = input.value;
addTask = document.createElement('li');
text = document.createTextNode(task);
addTask.appendChild(text);
addTask.classList.add("task");
taskNo++;
addTask.id = taskNo;
document.getElementById("taskList").appendChild(addTask);
input.value = "";
let list = document.getElementsByClassName("task");
[...list].forEach(b => {
b.addEventListener("click", () => {
remove = document.getElementById(b.id);
remove.parentNode.removeChild(remove);
});
});
}
html, body{
margin: 0;
padding: 0;
}
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
background-color: #29313d;
color: white;
}
#container {
width: 100%;
}
h1{
text-align: center;
font-size: 44px;
}
#input{
margin: auto;
text-align: center;
}
#message, #btn{
display: inline-block;
height: 100%;
margin-top: 10px;
padding: 0;
float: left;
-webkit-box-sizing: border-box;
}
#message{
background-color: #333;
color: white;
border: 4px solid coral;
padding-left: 10px;
width: 75%;
height: 50px;
border-radius: 10px;
}
#btn{
font-size: 20px;
background-color: coral;
border: 4px solid coral;
color: black;
margin-left: 5%;
width: 20%;
height: 50px;
border-radius: 10px;
}
#btn:focus{
outline: none;
}
#message:focus{
outline: none;
}
#input{
height: 50px;
width: 400px;
}
#taskList{
list-style-type: none;
padding: 0;
margin-top: 50px;
}
.task {
margin: auto;
width: 85%;
margin-top: 5px;
padding: 10px;
border: 4px solid coral;
background-color: #333;
color: white;
border-radius: 10px;
}
#media(max-width: 600px) {
#container {
width: 80%;
margin: 0 auto; /* to align center */
}
h1{
margin: auto;
}
#message{
width: 100%;
}
#btn{
/* display: none; */
}
.task{
width: 100%;
margin-left: 0;
margin-right: 0;
}
/*** Additional css ***/
.input-group.flex {
display: flex;
justify-content: center;
}
.input-group:before, .input-group:after {
content: "";
display: table;
clear: both;
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=10">
<link href="resources/style.css" rel="stylesheet" type="text/css">
<link href="resources/logo.png" rel="shortcut icon" type="image/png">
<title>Jennis App</title>
</head>
<body>
<div id="container">
<h1>To Do List</h1>
<div id="input">
<div class="input-group">
<input type="text" id="message" placeholder="Please enter a new task">
</div>
<!-- Added one additional class -->
<div class="input-group flex">
<input type="button" id="btn" value="Add">
</div>
</div>
<ul id="taskList">
</ul>
</div>
<script src="resources/code.js" type="text/javascript"></script>
</body>
</html>
working fiddle here

Make div not affected by other div's size

I'm creating some editable card as follow. When I click on the edit icon on first card, the shadow will show and it makes my div taller.
My problem is, can I make it so that when the shadow effect shows the other divs under it don't move/changes position like that. Also, this code is supposedly put on a snippet. When the shadow shows, it make the preview window (body) grow taller and things under it move downward. I want to make the window stays the same height before and after the shadow shows up.
Any help appreciated.
$(".card").click(function() {
if ($(this).val() == 0) {
$(this).addClass("clicked");
$(this).val(1);
}
else {
$(this).removeClass("clicked");
$(this).val(0);
}
});
$(".action").click(function() {
var thisCard = $(this).parent().parent();
thisCard.addClass("edit");
thisCard.css({"width": "238px"});
thisCard.find(".title").css({"display": "none"});
thisCard.find(".action").css({"display": "none"});
thisCard.find(".action-edit").css({"display": "table-cell"});
thisCard.find(".input-group").css({"display": "table-cell"});
if (thisCard.find(".input-sub-line").length == 0) {
thisCard.find(".input-main").val(thisCard.find(".title").text());
}
else {
thisCard.find(".input-main").val(thisCard.find(".title-main").text());
thisCard.find(".input-sub").val(thisCard.find(".title-sub").text());
}
thisCard.find(".input-main").focus();
thisCard.removeClass("clicked");
});
$(".check").click(function() {
var thisCard = $(this).parent().parent().parent();
thisCard.removeClass("edit");
thisCard.css({"width": "240px"});
thisCard.find(".title").css({"display": "table-cell"});
thisCard.find(".action").css({"display": "table-cell"});
thisCard.find(".action-edit").css({"display": "none"});
thisCard.find(".input-group").css({"display": "none"});
if (thisCard.find(".input-sub-line").length == 0) {
thisCard.find(".title").text(thisCard.find(".input-main").val());
}
else {
thisCard.find(".title-main").text(thisCard.find(".input-main").val());
thisCard.find(".title-sub").text(thisCard.find(".input-sub").val());
}
thisCard.removeClass("clicked");
});
$(".cancel").click(function() {
var thisCard = $(this).parent().parent().parent();
thisCard.removeClass("edit");
thisCard.css({"width": "240px"});
thisCard.find(".title").css({"display": "table-cell"});
thisCard.find(".action").css({"display": "table-cell"});
thisCard.find(".action-edit").css({"display": "none"});
thisCard.find(".input-group").css({"display": "none"});
thisCard.removeClass("clicked");
});
.card {
display: table;
width: 240px;
height: 70px;
border: transparent;
border-radius: 3px;
background-color: #FAFAFA;
box-shadow: 0px 3px 6px 0 rgba(0,0,0,0.15);
font-size: 16px;
cursor: pointer;
margin: 32px auto;
}
.card .content {
display: table-row;
width: 100%;
}
.card .content .title,
.card .content .input {
display: table-cell;
padding: 24px;
width: calc(100% - 36px);
font-size: 16px;
color: #333;
}
.card .content .input {
display: none;
}
input {
border: none;
font-size: 13px;
border-bottom: solid 1px #c4c4c4;
width: 100%;
}
input:focus {
outline-style:none;
box-shadow:none;
border-bottom: solid 1px #c4c4c4;
}
.card .content .action {
display: table-cell;
width: 36px;
padding: 24px 16px;
text-align: right;
}
.card .content .action-edit {
display: none;
width: 36px;
padding: 0;
border-left: solid 1px #c4c4c4;
vertical-align: top;
}
.check,
.cancel {
height: 34.5px;
text-align: center;
}
.action-edit > .check i,
.action-edit >.cancel i {
line-height: 35px;
font-size: 13px;
}
.cancel i {
color: #333;
}
.check i {
color: #00c983;
}
.check-tall,
.cancel-tall {
height: 45.5px;
}
.check-tall i,
.cancel-tall i {
line-height: 46px !important;
}
.cancel {
border-bottom: solid 1px #c4c4c4;
}
.card .content .action i {
font-size: 14px;
color: #333;
}
.card .content .action i:hover {
color: #00c983;
}
.clicked {
background-color: #CAF1FF;
box-shadow: 0px 0px 32px 0 rgba(0,153,255,0.3);
}
.edit {
background-color: #fff;
border: solid 1px #00c983;
box-shadow: 0px 0px 32px 0 rgba(0,153,255,0.3);
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.subtitle {
font-size: 12px;
}
.subtitle-label {
color: #999;
}
.input-sub {
font-size: 12px;
}
.input-sub-line {
display: table-row;
width: 100%;
}
.input-sub-label {
display: table-cell;
width: 25%;
font-size: 12px;
color: #999;
}
.input-sub {
display: table-cell;
width: 100%;
}
.input-group {
display: none;
padding: 22px 24px;
}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.11/css/all.css" integrity="sha384-p2jx59pefphTFIpeqCcISO9MdVfIm4pNnsL08A6v5vaQc4owkQqxMV8kg4Yvhaw/" crossorigin="anonymous">
<div class="card" value=0>
<div class="content">
<div class="title">Education</div>
<div class="input-group"><input type="text" class="input-main"></div>
<div class="action"><i class="fas fa-pencil-alt"></i></div>
<div class="action-edit">
<div class="cancel"><i class="fas fa-times"></i></div>
<div class="check"><i class="fas fa-check"></i></div>
</div>
</div>
</div>
<div class="caption">1-Attribute Card</div>
<div class="card" value=0>
<div class="content">
<div class="title"><span class="title-main">Education</span><br><span class="subtitle"><span class="subtitle-label">Code </span><span class="title-sub">030</span></span></div>
<div class="input-group">
<input type="text" class="input-main">
<div class="input-sub-line">
<div class="input-sub-label">Code</div>
<input class="input-sub" type="text"></div>
</div>
<div class="action"><i class="fas fa-pencil-alt"></i></div>
<div class="action-edit">
<div class="cancel cancel-tall"><i class="fas fa-times"></i></div>
<div class="check check-tall"><i class="fas fa-check"></i></div>
</div>
</div>
</div>
<div class="caption">2-Attributes Card</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
I'm not 100% sure if I understood your question correctly, but the only movement I see is caused by the border that gets applied to .card. If you add an initial border to the .card before you edit it, the element won't increase in size and it won't move. I made the border transparent, so it is not going to be visible.
$(".card").click(function() {
if ($(this).val() == 0) {
$(this).addClass("clicked");
$(this).val(1);
}
else {
$(this).removeClass("clicked");
$(this).val(0);
}
});
$(".action").click(function() {
var thisCard = $(this).parent().parent();
thisCard.addClass("edit");
thisCard.css({"width": "238px"});
thisCard.find(".title").css({"display": "none"});
thisCard.find(".action").css({"display": "none"});
thisCard.find(".action-edit").css({"display": "table-cell"});
thisCard.find(".input-group").css({"display": "table-cell"});
if (thisCard.find(".input-sub-line").length == 0) {
thisCard.find(".input-main").val(thisCard.find(".title").text());
}
else {
thisCard.find(".input-main").val(thisCard.find(".title-main").text());
thisCard.find(".input-sub").val(thisCard.find(".title-sub").text());
}
thisCard.find(".input-main").focus();
thisCard.removeClass("clicked");
});
$(".check").click(function() {
var thisCard = $(this).parent().parent().parent();
thisCard.removeClass("edit");
thisCard.css({"width": "240px"});
thisCard.find(".title").css({"display": "table-cell"});
thisCard.find(".action").css({"display": "table-cell"});
thisCard.find(".action-edit").css({"display": "none"});
thisCard.find(".input-group").css({"display": "none"});
if (thisCard.find(".input-sub-line").length == 0) {
thisCard.find(".title").text(thisCard.find(".input-main").val());
}
else {
thisCard.find(".title-main").text(thisCard.find(".input-main").val());
thisCard.find(".title-sub").text(thisCard.find(".input-sub").val());
}
thisCard.removeClass("clicked");
});
$(".cancel").click(function() {
var thisCard = $(this).parent().parent().parent();
thisCard.removeClass("edit");
thisCard.css({"width": "240px"});
thisCard.find(".title").css({"display": "table-cell"});
thisCard.find(".action").css({"display": "table-cell"});
thisCard.find(".action-edit").css({"display": "none"});
thisCard.find(".input-group").css({"display": "none"});
thisCard.removeClass("clicked");
});
.card {
display: table;
width: 240px;
height: 70px;
border: transparent;
border-radius: 3px;
background-color: #FAFAFA;
box-shadow: 0px 3px 6px 0 rgba(0,0,0,0.15);
font-size: 16px;
cursor: pointer;
margin: 32px auto;
border: solid 1px transparent;
}
.card .content {
display: flex;
width: 100%;
max-height: 86px;
}
.card .content .title,
.card .content .input {
display: table-cell;
padding: 24px;
width: calc(100% - 36px);
font-size: 16px;
color: #333;
}
.card .content .input {
display: none;
}
input {
border: none;
font-size: 13px;
border-bottom: solid 1px #c4c4c4;
width: 100%;
}
input:focus {
outline-style:none;
box-shadow:none;
border-bottom: solid 1px #c4c4c4;
}
.card .content .action {
display: table-cell;
width: 36px;
padding: 24px 16px;
text-align: right;
}
.card .content .action-edit {
display: none;
width: 36px;
padding: 0;
border-left: solid 1px #c4c4c4;
vertical-align: top;
}
.check,
.cancel {
height: 34.5px;
text-align: center;
}
.action-edit > .check i,
.action-edit >.cancel i {
line-height: 35px;
font-size: 13px;
}
.cancel i {
color: #333;
}
.check i {
color: #00c983;
}
.check-tall,
.cancel-tall {
height: 45.5px;
}
.check-tall i,
.cancel-tall i {
line-height: 46px !important;
}
.cancel {
border-bottom: solid 1px #c4c4c4;
}
.card .content .action i {
font-size: 14px;
color: #333;
}
.card .content .action i:hover {
color: #00c983;
}
.clicked {
background-color: #CAF1FF;
box-shadow: 0px 0px 32px 0 rgba(0,153,255,0.3);
}
.edit {
background-color: #fff;
border: solid 1px #00c983;
box-shadow: 0px 0px 32px 0 rgba(0,153,255,0.3);
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.subtitle {
font-size: 12px;
}
.subtitle-label {
color: #999;
}
.input-sub {
font-size: 12px;
}
.input-sub-line {
display: table-row;
width: 100%;
}
.input-sub-label {
display: table-cell;
width: 25%;
font-size: 12px;
color: #999;
}
.input-sub {
display: table-cell;
width: 100%;
}
.input-group {
display: none;
padding: 22px 24px;
}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.11/css/all.css" integrity="sha384-p2jx59pefphTFIpeqCcISO9MdVfIm4pNnsL08A6v5vaQc4owkQqxMV8kg4Yvhaw/" crossorigin="anonymous">
<div class="card" value=0>
<div class="content">
<div class="title">Education</div>
<div class="input-group"><input type="text" class="input-main"></div>
<div class="action"><i class="fas fa-pencil-alt"></i></div>
<div class="action-edit">
<div class="cancel"><i class="fas fa-times"></i></div>
<div class="check"><i class="fas fa-check"></i></div>
</div>
</div>
</div>
<div class="caption">1-Attribute Card</div>
<div class="card" value=0>
<div class="content">
<div class="title"><span class="title-main">Education</span><br><span class="subtitle"><span class="subtitle-label">Code </span><span class="title-sub">030</span></span></div>
<div class="input-group">
<input type="text" class="input-main">
<div class="input-sub-line">
<div class="input-sub-label">Code</div>
<input class="input-sub" type="text"></div>
</div>
<div class="action"><i class="fas fa-pencil-alt"></i></div>
<div class="action-edit">
<div class="cancel cancel-tall"><i class="fas fa-times"></i></div>
<div class="check check-tall"><i class="fas fa-check"></i></div>
</div>
</div>
</div>
<div class="caption">2-Attributes Card</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
For the first box you can start by changing border to outline in the .edit class since that is adding 2px to the height.
This does not solve the second box where it has extra content inside the card. Might want to make the caption position: absolute;

HTML/CSS: How to add Custom Banner in phpBB Style

I need some assistance in replacing and adding my own Header to the DualCore style. I tried contacting the author of the style, but it appears he is not available.
As you can see there's small header on top right under the login link, but i am having some difficulties replacing it and adding my own header.
Part of the Header i want to replace is "mainheader" and looks like this"mainheader" In the overal_header.html you can find it, but im not so sure what to add or replace. My banner image is "dep_banner.png" width: 900 Height: 145.
Common.css
/* General Markup Styles
---------------------------------------- */
* {
/* Reset browsers default margin, padding and font sizes */
margin: 0;
padding: 0;
}
html {
font-size: 100%;
/* Always show a scrollbar for short pages - stops the jump when the scrollbar appears. non-IE browsers */
height: 101%;
}
body {
/* Text-Sizing with ems: http://www.clagnut.com/blog/348/ */
font-family: Verdana, Helvetica, Arial, sans-serif;
color: #828282;
background-color: #FFFFFF;
/*font-size: 62.5%; This sets the default font size to be equivalent to 10px */
font-size: 10px;
margin: 0;
padding: 12px 0;
}
h1 {
/* Forum name */
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
margin-right: 200px;
color: #FFFFFF;
margin-top: 15px;
font-weight: bold;
font-size: 2em;
}
h2 {
/* Forum header titles */
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-weight: normal;
color: #3f3f3f;
font-size: 2em;
margin: 0.8em 0 0.2em 0;
}
h2.solo {
margin-bottom: 1em;
}
h3 {
/* Sub-headers (also used as post headers, but defined later) */
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
text-transform: uppercase;
border-bottom: 1px solid #CCCCCC;
margin-bottom: 3px;
padding-bottom: 2px;
font-size: 1.05em;
color: #989898;
margin-top: 20px;
}
h4 {
/* Forum and topic list titles */
font-family: "Trebuchet MS", Verdana, Helvetica, Arial, Sans-serif;
font-size: 1.3em;
}
p {
line-height: 1.3em;
font-size: 1.1em;
margin-bottom: 1.5em;
}
img {
border-width: 0;
}
hr {
/* Also see tweaks.css */
border: 0 none #FFFFFF;
border-top: 1px solid #CCCCCC;
height: 1px;
margin: 5px 0;
display: block;
clear: both;
}
hr.dashed {
border-top: 1px dashed #CCCCCC;
margin: 10px 0;
}
hr.divider {
display: none;
}
p.right {
text-align: right;
}
/* Main blocks
---------------------------------------- */
#wrap {
padding: 5px 5px;
min-width: 900px;
margin: 0 auto;
background-color: #ffffff;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
#simple-wrap {
padding: 6px 10px;
background-color: #ffffff;
}
#page-body {
margin: 4px 0;
clear: both;
}
#page-footer {
clear: both;
}
#page-footer h3 {
margin-top: 20px;
}
#logo {
float: left;
width: auto;
padding: 10px 13px 0 10px;
}
a#logo:hover {
text-decoration: none;
}
/* Search box
--------------------------------------------- */
#search-box {
color: #FFFFFF;
position: relative;
margin-top: 30px;
margin-right: 5px;
display: block;
float: right;
text-align: right;
white-space: nowrap; /* For Opera */
}
#search-box #keywords {
width: 95px;
background-color: #FFF;
}
#search-box input {
border: 1px solid #b0b0b0;
}
/* .button1 style defined later, just a few tweaks for the search button version */
#search-box input.button1 {
padding: 1px 5px;
}
#search-box li {
text-align: right;
margin-top: 4px;
}
#search-box img {
vertical-align: middle;
margin-right: 3px;
}
/* Site description and logo */
#site-description {
float: left;
width: 70%;
}
#site-description h1 {
margin-right: 0;
}
/* Round cornered boxes and backgrounds
---------------------------------------- */
.headerbar {
background: #ebebeb none repeat-x 0 0;
color: #FFFFFF;
margin-bottom: 4px;
padding: 0 5px;
}
.navbar {
background-color: #ebebeb;
padding: 0 10px;
}
.forabg {
background: #b1b1b1 none repeat-x 0 0;
margin-bottom: 4px;
padding: 0 5px;
clear: both;
}
.forumbg {
background: #ebebeb none repeat-x 0 0;
margin-bottom: 4px;
padding: 0 5px;
clear: both;
}
.panel {
margin-bottom: 4px;
padding: 0 10px;
background-color: #f3f3f3;
color: #3f3f3f;
}
.post {
padding: 0 10px;
margin-bottom: 4px;
background-repeat: no-repeat;
background-position: 100% 0;
}
.post:target .content {
color: #000000;
}
.post:target h3 a {
color: #000000;
}
.bg1 { background-color: #f7f7f7;}
.bg2 { background-color: #f2f2f2; }
.bg3 { background-color: #ebebeb; }
.rowbg {
margin: 5px 5px 2px 5px;
}
.ucprowbg {
background-color: #e2e2e2;
}
.fieldsbg {
/*border: 1px #DBDEE2 solid;*/
background-color: #eaeaea;
}
span.corners-top, span.corners-bottom, span.corners-top span, span.corners-bottom span {
font-size: 1px;
line-height: 1px;
display: block;
height: 5px;
background-repeat: no-repeat;
}
span.corners-top {
background-image: none;
background-position: 0 0;
margin: 0 -5px;
}
span.corners-top span {
background-image: none;
background-position: 100% 0;
}
span.corners-bottom {
background-image: none;
background-position: 0 100%;
margin: 0 -5px;
clear: both;
}
span.corners-bottom span {
background-image: none;
background-position: 100% 100%;
}
.headbg span.corners-bottom {
margin-bottom: -1px;
}
.post span.corners-top, .post span.corners-bottom, .panel span.corners-top, .panel span.corners-bottom, .navbar span.corners-top, .navbar span.corners-bottom {
margin: 0 -10px;
}
.rules span.corners-top {
margin: 0 -10px 5px -10px;
}
.rules span.corners-bottom {
margin: 5px -10px 0 -10px;
}
/* Horizontal lists
----------------------------------------*/
ul.linklist {
display: block;
margin: 0;
}
ul.linklist li {
display: block;
list-style-type: none;
float: left;
width: auto;
margin-right: 5px;
font-size: 1.1em;
line-height: 2.2em;
}
ul.linklist li.rightside, p.rightside {
float: right;
margin-right: 0;
margin-left: 5px;
text-align: right;
}
ul.navlinks {
padding-bottom: 1px;
margin-bottom: 1px;
border-bottom: 1px solid #FFFFFF;
font-weight: bold;
}
ul.leftside {
float: left;
margin-left: 0;
margin-right: 5px;
text-align: left;
}
ul.rightside {
float: right;
margin-left: 5px;
margin-right: -5px;
text-align: right;
}
/* Table styles
----------------------------------------*/
table.table1 {
/* See tweaks.css */
}
#ucp-main table.table1 {
padding: 2px;
}
table.table1 thead th {
font-weight: normal;
text-transform: uppercase;
color: #FFFFFF;
line-height: 1.3em;
font-size: 1em;
padding: 7px 8px;
}
table.table1 thead th span {
padding-left: 7px;
}
table.table1 tbody tr {
border: 1px solid #cfcfcf;
}
table.table1 tbody tr:hover, table.table1 tbody tr.hover {
background-color: #f6f6f6;
color: #000;
}
table.table1 td {
color: #6a6a6a;
font-size: 1.1em;
}
table.table1 tbody td {
padding: 5px;
border-top: 1px solid #FAFAFA;
}
table.table1 tbody th {
padding: 5px;
border-bottom: 1px solid #000000;
text-align: left;
color: #333333;
background-color: #FFFFFF;
}
/* Specific column styles */
table.table1 .name { text-align: left; }
table.table1 .posts { text-align: center !important; width: 7%; }
table.table1 .joined { text-align: left; width: 15%; }
table.table1 .active { text-align: left; width: 15%; }
table.table1 .mark { text-align: center; width: 7%; }
table.table1 .info { text-align: left; width: 30%; }
table.table1 .info div { width: 100%; white-space: normal; overflow: hidden; }
table.table1 .autocol { line-height: 2em; white-space: nowrap; }
table.table1 thead .autocol { padding-left: 1em; }
table.table1 span.rank-img {
float: right;
width: auto;
}
table.info td {
padding: 3px;
}
table.info tbody th {
padding: 3px;
text-align: right;
vertical-align: top;
color: #000000;
font-weight: normal;
}
.forumbg table.table1 {
margin: 0;
}
.forumbg-table > .inner {
margin: 0 -1px;
}
.forumbg-table > .inner > span.corners-top {
margin: 0 -4px -1px -4px;
}
.forumbg-table > .inner > span.corners-bottom {
margin: -1px -4px 0 -4px;
}
/* Misc layout styles
---------------------------------------- */
/* column[1-2] styles are containers for two column layouts
Also see tweaks.css */
.column1 {
float: left;
clear: left;
width: 49%;
}
.column2 {
float: right;
clear: right;
width: 49%;
}
/* General classes for placing floating blocks */
.left-box {
float: left;
width: auto;
text-align: left;
}
.right-box {
float: right;
width: auto;
text-align: right;
}
dl.details {
/*font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;*/
font-size: 1.1em;
}
dl.details dt {
float: left;
clear: left;
width: 30%;
text-align: right;
color: #000000;
display: block;
}
dl.details dd {
margin-left: 0;
padding-left: 5px;
margin-bottom: 5px;
color: #828282;
float: left;
width: 65%;
}
/* Pagination
---------------------------------------- */
.pagination {
height: 1%; /* IE tweak (holly hack) */
width: auto;
text-align: right;
margin-top: 5px;
float: right;
}
.pagination span.page-sep {
display: none;
}
li.pagination {
margin-top: 0;
}
.pagination strong, .pagination b {
font-weight: normal;
}
.pagination span strong {
padding: 0 2px;
margin: 0 2px;
font-weight: normal;
color: #FFFFFF;
background-color: #bfbfbf;
border: 1px solid #bfbfbf;
font-size: 0.9em;
}
.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active {
font-weight: normal;
text-decoration: none;
color: #747474;
margin: 0 2px;
padding: 0 2px;
background-color: #eeeeee;
border: 1px solid #bababa;
font-size: 0.9em;
line-height: 1.5em;
}
.pagination span a:hover {
border-color: #d2d2d2;
background-color: #d2d2d2;
color: #FFF;
text-decoration: none;
}
.pagination img {
vertical-align: middle;
}
/* Pagination in viewforum for multipage topics */
.row .pagination {
display: block;
float: right;
width: auto;
margin-top: 0;
padding: 1px 0 1px 15px;
font-size: 0.9em;
background: none 0 50% no-repeat;
}
.row .pagination span a, li.pagination span a {
background-color: #FFFFFF;
}
.row .pagination span a:hover, li.pagination span a:hover {
background-color: #d2d2d2;
}
/* Miscellaneous styles
---------------------------------------- */
#forum-permissions {
float: right;
width: auto;
padding-left: 5px;
margin-left: 5px;
margin-top: 10px;
text-align: right;
}
.copyright {
padding: 5px;
text-align: center;
color: #555555;
}
.small {
font-size: 0.9em !important;
}
.titlespace {
margin-bottom: 15px;
}
.headerspace {
margin-top: 20px;
}
.error {
color: #bcbcbc;
font-weight: bold;
font-size: 1em;
}
.reported {
background-color: #f7f7f7;
}
li.reported:hover {
background-color: #ececec;
}
div.rules {
background-color: #ececec;
color: #bcbcbc;
padding: 0 10px;
margin: 10px 0;
font-size: 1.1em;
}
div.rules ul, div.rules ol {
margin-left: 20px;
}
p.rules {
background-color: #ececec;
background-image: none;
padding: 5px;
}
p.rules img {
vertical-align: middle;
padding-top: 5px;
}
p.rules a {
vertical-align: middle;
clear: both;
}
#top {
position: absolute;
top: -20px;
}
.clear {
display: block;
clear: both;
font-size: 1px;
line-height: 1px;
background: transparent;
}
overall_header
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- INCLUDE dualcore_config.html -->
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>
<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
<title>{SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE}</title>
<!-- IF S_ENABLE_FEEDS -->
<!-- IF S_ENABLE_FEEDS_OVERALL --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {SITENAME}" href="{U_FEED}" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_NEWS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_NEWS}" href="{U_FEED}?mode=news" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_FORUMS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_ALL_FORUMS}" href="{U_FEED}?mode=forums" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_TOPICS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_NEW}" href="{U_FEED}?mode=topics" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_TOPICS_ACTIVE --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_ACTIVE}" href="{U_FEED}?mode=topics_active" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_FORUM and S_FORUM_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FORUM} - {FORUM_NAME}" href="{U_FEED}?f={S_FORUM_ID}" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_TOPIC and S_TOPIC_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{U_FEED}?f={S_FORUM_ID}&t={S_TOPIC_ID}" /><!-- ENDIF -->
<!-- ENDIF -->
<!--
phpBB style name: DualCore
Based on style: prosilver (this is the default phpBB3 style)
Original author: Tom Beddard ( http://www.subBlue.com/ )
Modified by: Abhishek Srivastava ( http://www.abhisheksrivastava.in )
-->
<script type="text/javascript">
// <![CDATA[
var jump_page = '{LA_JUMP_PAGE}:';
var on_page = '{ON_PAGE}';
var per_page = '{PER_PAGE}';
var base_url = '{A_BASE_URL}';
var style_cookie = 'phpBBstyle';
var style_cookie_settings = '{A_COOKIE_SETTINGS}';
var onload_functions = new Array();
var onunload_functions = new Array();
<!-- IF S_USER_PM_POPUP and S_NEW_PM -->
var url = '{UA_POPUP_PM}';
window.open(url.replace(/&/g, '&'), '_phpbbprivmsg', 'height=225,resizable=yes,scrollbars=yes, width=400');
<!-- ENDIF -->
/**
* Find a member
*/
function find_username(url)
{
popup(url, 760, 570, '_usersearch');
return false;
}
/**
* New function for handling multiple calls to window.onload and window.unload by pentapenguin
*/
window.onload = function()
{
for (var i = 0; i < onload_functions.length; i++)
{
eval(onload_functions[i]);
}
};
window.onunload = function()
{
for (var i = 0; i < onunload_functions.length; i++)
{
eval(onunload_functions[i]);
}
};
// ]]>
</script>
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/styleswitcher.js"></script>
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery.cookie.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery.collapse.js"></script>
<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
<link href="{T_THEME_PATH}/normal.css" rel="stylesheet" type="text/css" title="A" />
<link href="{T_THEME_PATH}/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
<link href="{T_THEME_PATH}/large.css" rel="alternate stylesheet" type="text/css" title="A++" />
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
<link href="{T_THEME_PATH}/bidi.css" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->
</head>
<body id="phpbb" class="section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}">
<div class="topnav">
<div style="margin: 0 auto; min-width: 900px; width: {$BOARD_WIDTH}; position: relative;">
<div class="navlink"><ul>
<!-- IF not S_USER_LOGGED_IN and S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) and not S_IS_BOT -->
<li><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x">
<strong><img src="{T_THEME_PATH}/images/icon_logout.png" width="16" height="16" alt="" />{L_LOGIN_LOGOUT}</strong>
</a></li>
<li><a href="{U_REGISTER}">
<strong><img src="{T_THEME_PATH}/images/icon_register.png" width="16" height="16" alt="" />{L_REGISTER}</strong>
</a></li>
<!-- ENDIF -->
<!-- IF S_USER_LOGGED_IN and not S_IS_BOT -->
<li><a href="{U_PROFILE}">
<strong><img src="{T_THEME_PATH}/images/icon_ucp.png" width="20" height="20" alt="" />{S_USERNAME}</strong>
</a></li>
<!-- ENDIF -->
<!-- IF U_ACP -->
<li><a href="{U_ACP}">
<strong><img src="{T_THEME_PATH}/images/icon_admin.png" width="20" height="20" alt="" />{L_ACP}</strong>
</a></li>
<!-- ENDIF -->
<!-- IF S_DISPLAY_PM and not S_IS_BOT and S_USER_LOGGED_IN -->
<li><a href="{U_PRIVATEMSGS}">
<strong><img src="{T_THEME_PATH}/images/icon_pm.png" width="20" height="20" alt="" />{PRIVATE_MESSAGE_INFO}</strong>
</a></li>
<!-- ENDIF -->
<!-- IF U_RESTORE_PERMISSIONS -->
<li><a href="{U_RESTORE_PERMISSIONS}">
<strong><img src="{T_THEME_PATH}/images/icon_restore.png" width="16" height="16" alt="" />{L_RESTORE_PERMISSIONS}</strong>
</a></li>
<!-- ENDIF -->
<!-- IF S_USER_LOGGED_IN and not S_IS_BOT -->
<li><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x">
<strong><img src="{T_THEME_PATH}/images/icon_logout.png" width="20" height="20" alt="" />{L_LOGOUT}</strong>
</a></li>
<!-- ENDIF -->
</ul></div>
<div class="navlink" style="float: right;"><ul><li>
<!-- IF S_USER_LOGGED_IN -->
<div class="float-right">
<div class="quicksearch">
<!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
<form action="{U_SEARCH}" method="get" id="search">
<fieldset>
<input name="keywords" id="keywords" type="text" maxlength="128" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" />
<!--<input class="button2" value="{L_SEARCH}" type="submit" />-->
{S_SEARCH_HIDDEN_FIELDS}
</fieldset>
</form>
<!-- ENDIF -->
</div>
</div>
<!-- ENDIF -->
<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
<form method="post" action="{S_LOGIN_ACTION}" style="margin-top: -6px; margin-right: -5px;">
<fieldset class="quick-login">
<label for="username" style="color: #fff;">{L_USERNAME}:</label> <input type="text" name="username" id="username" size="15" class="inputbox" title="{L_USERNAME}" />
<label for="password" style="color: #fff;">{L_PASSWORD}:</label> <input type="password" name="password" id="password" size="15" class="inputbox" title="{L_PASSWORD}" />
<input type="submit" name="login" value="{L_LOGIN}" class="button1" />
{S_LOGIN_REDIRECT}
</fieldset>
</form>
<!-- ENDIF -->
</li></ul></div>
</div>
</div>
<div id="wrap" style="width: {$BOARD_WIDTH};">
<a id="top" name="top" accesskey="t"></a>
<div id="page-header">
<div class="mainheader">
<a style="display: inline-block; width: 900px; height: 145px;" href="{U_INDEX}" accesskey="h" class="logo.png"<!-- IF $LOGO_ANIMATION == 'on' --> dualcore-logo-animation<!-- ENDIF -->"></a>
</div>
<div class="mainheader">
<div class="mainnav<!-- IF $MENU_ANIMATION == 'on' --> mainnav-animation<!-- ENDIF -->"><ul>
<li><a href="{U_INDEX}" accesskey="h">
<strong>{L_HOME}</strong>
<span>{SITENAME}</span>
</a></li>
<li><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">
<strong>{L_FAQ}</strong>
<span>{L_FAQ_EXPLAIN}</span>
</a></li>
<!-- IF not S_IS_BOT and S_DISPLAY_MEMBERLIST -->
<li><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}">
<strong>{L_MEMBERLIST}</strong>
<span>{L_MEMBERLIST_EXPLAIN}</span>
</a></li>
<!-- ENDIF -->
<!-- IF S_DISPLAY_SEARCH -->
<li><a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">
<strong>{L_SEARCH}</strong>
<span>{L_SEARCH_ADV_EXPLAIN}</span>
</a></li>
<!-- ENDIF -->
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
<li><a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="e">
<strong>{L_READ_PROFILE}</strong>
<span>{L_PROFILE}</span>
</a></li>
<!-- ENDIF -->
</ul></div>
</div>
<div class="nav-bar">
<img src="{T_THEME_PATH}/images/icon_home.png" width="16" height="16" alt="" />{L_INDEX} <!-- BEGIN navlinks --> <strong>‹</strong> {navlinks.FORUM_NAME}<!-- END navlinks -->
</div>
</div>
<a name="start_here"></a>
<div id="page-body">
<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN and (U_MCP or U_ACP) -->
<div id="information" class="rules">
<div class="inner"><span class="corners-top"><span></span></span>
<strong>{L_INFORMATION}:</strong> {L_BOARD_DISABLED}
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->
In the html you've included, try replacing
<div class="mainheader">
<a style="display: inline-block; width: 900px; height: 145px;" href="{U_INDEX}" accesskey="h" class="logo.png"<!-- IF $LOGO_ANIMATION == 'on' --> dualcore-logo-animation<!-- ENDIF -->"></a>
</div>
with
<div class="mainheader">
<a style="display: inline-block; width: 100%;" href="{U_INDEX}" accesskey="h"><img src="images/dep_banner.png" style="width=100%"/></a>
</div>
Adding the image as <img> instead of background-image will be easier to resize. More info here.

how to remove line breaks after each word in ionic

I made a custom list in my ionic app and it runs fine on my browser. But when I built it on android, the text in the h2 tag for the display name breaks to a new line after each word. I've tried removing the word-wrap and word-break from the css, but it still doesn't work.
This is the HTML for the view:
<ion-view view-title="Crave">
<fab ui-sref="post" class="ink"><i class="ion-compose"></i></fab>
<ion-content>
<ion-refresher pulling-text="Pull to refresh" pulling-icon="ion-arrow-down-b" on-refresh="doRefresh()">
</ion-refresher>
<div class="m-cards">
<div class="m-card" ng-repeat="post in posts">
<div class="m-card-header">
<span><i class="ion-android-time"></i>&nbsp In 2hrs</span>
<img ng-src="{{post.face}}" class="ink rip">
<h2>{{post.name}}</h2><br />
<p>#{{post.username}}</p><br /><br />
</div>
<span>{{post.postText}}</span>
<div class="m-card-stats">
<i class="ion-ios-heart"></i>&nbsp {{post.likes}}
<i class="ion-chatbox"></i>&nbsp {{post.comments}}
<i class="ion-android-share-alt"></i>
<span>12d ago</span>
</div>
<hr />
</div>
</div>
</ion-content>
</ion-view>
And this is the css:
.m-cards {
}
.m-card {
border-radius: 2px;
margin-bottom: 5px;
padding: 2px 20px;
width: 100%;
}
.m-card a {
color: #ef473a;
}
.m-card-post-alt {
color: #777;
height: 18px;
overflow: hidden;
}
.m-card-header h2 {
color: #000;
float: left;
font-size: 12pt;
font-weight: 300;
margin: 0;
margin-left: 10px;
word-wrap: normal !important;
word-break: normal !important;
}
.m-card-header p {
color: #000;
float: left;
margin: 0;
margin-left: 10px;
}
.m-card-header span {
color: #444;
float: right;
margin: 0;
}
.m-card-header img {
border-radius: 5px;
float: left;
height: 48px;
width: 48px;
}
.m-card-header span {
color: #444;
float: right;
margin: 0;
}
.m-card-stats {
margin-top: 20px;
}
.m-card-stats span {
color: #000;
float: right;
margin: 0;
}
.m-card-stats a {
color: #000;
margin-right: 20px;
}
Thanks in advance!!!
Finally fixed it. All I needed was to set the word-spacing to normal.
.m-card-header h2 {
color: #000;
float: left;
font-size: 12pt;
font-weight: 300;
margin: 0;
margin-left: 10px;
word-spacing: normal !important;
}

IE: Divs move when window is resized too small

I'm almost finished with this site, and am just now trying to make it cross-browser. It works wonderfully in everything but IE6. I've fixed two of the problems it had, but am lost on the last one. The left sidebar moves right when the window is re-sized to something around 800px. The more you re-size, the more it moves, eventually covering up the content. This also seems to affect the header by shrinking it. The header is a small problem, but mostly just an annoyance.
I've tried a few fixes, but that did nothing. The only thread I could find that relates to this mentions that jQuery may be affecting it, but I have no jQuery set on that div. I'd appreciate any help that is given, as my deadline is approaching.
My HTML is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript" src="file:///C:/resources/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../../_script/textShorten.js"></script>
<script type="text/javascript" src="file:///C:/Users/Matt/Desktop/Coding/Framed/framed_over.js"></script>
<link rel="stylesheet" href="file:///C:/Users/Matt/Desktop/Coding/Framed/framed.css" type="text/css" />
<link rel="stylesheet" href="../../_script/css.css" type="text/css" />
<style type="text/css">
_#wrapper { height: 600px; }
/* Photo Styles */
#wrapper { padding-right: 241px; }
#sidebar { right: 216px; }
#infobar { margin-right: -241px; }
#content { padding: 10px 20px; }
</style>
</head>
<body>
<div id="header"><img src="../../_images/logo.png" alt=" " id="logo" /></div>
<div id="wrapper">
<!-- START CONTENT -->
<div id="content" class="column">
<img src="-photo-images/thumb__zimmerman-thomas_01.jpg" class="framed" alt="Glasgow Necropolis 1">
<img src="-photo-images/thumb__zimmerman-thomas_02.jpg" class="framed" alt="Glasgow Necropolis 2">
<img src="-photo-images/thumb__zimmerman-thomas_03.jpg" class="framed" alt="Mother (II)">
</div>
<!-- END CONTENT -->
<div id="sidebar" class="column">
<div id="top"><!-- EMPTY DIV --></div>
Home<br />
<a href="archives.html/" id="none" >Archives</a><br />
About Us<br />
Submit Your Work<br />
<hr />
<h2>January 2011</h2>
<h3>Poets</h3>
<ul>
<li>Valentina Cano</li>
<li>Ricky Garni</li>
<li>Kyle Hemmings</li>
<li>Paulus Kapteyn</li>
<li>Tammy Ho Lai-Ming</li>
<li>Laura LeHew</li>
<li>Rhonda Maness</li>
<li>Anita McQueen</li>
<li>Rodney Nelson</li>
<li>Lise Phillips</li>
<li>Changming Yuan</li>
<li>Desmond Kon Zhicheng-Mingdé</li>
</ul>
<br />
<h3>Photographers</h3>
<ul>
<li>Leila Fortier</li>
<li>Tammy Ho Lai-Ming</li>
<li>Allicia Strickland</li>
<li>Jump Study Photography</li>
<li>Thomas Zimmerman</li>
</ul>
</div>
<div id="infobar" class="column">
<h1 id="author">Thomas Zimmerman</h1>
<br />
<!-- Poem List -->
<h4>Poems</h4>
<ul id="submitList">
<li>Glasgow Necropolis 1</li>
<li>Glasgow Necropolis 2</li>
<li>Mother (II)</li>
</ul><br />
<!-- Issue Features -->
<h4>Featured in Issues:</h4>
<ul>
<li>March 2011</li>
</ul>
<!-- Biography Start -->
<h1 id="mark">Biography</h1>
<p id="Bio">
Thomas Zimmerman teaches English, directs the Writing Center, and edits three literary magazines at Washtenaw Community College, in Ann Arbor, MI. Photographs of his have appeared recently in the small magazines Bete Noire and Muscle & Blood.
</p>
</div>
</div>
<script type="text/javascript">$("#infobar li").ellipsis();</script> <!-- For FireFox -->
</body>
My CSS:
/* Poetry Styles */
/* #wrapper { padding-right: 301px; }
#sidebar { right: 276px; }
#infobar { margin-right: -301px; }
#content { padding: 20px 50px; }
*/
/* Photo Styles */
/* #wrapper { padding-right: 241px; }
#sidebar { right: 216px; }
#infobar { margin-right: -241px; }
#content { padding: 10px 20px; }
*/
html,body,div,span,h1,h2,h3,h4,h5,h6,hr,p,a,abbr,acronym,address,big,del,em,img,
small,strike,strong,sub,sup,ul,ol,fieldset,form,label,legend,
table,caption,tbody,tfoot,thead,tr,th,td,optgroup,option
{ margin: 0; padding: 0; border: 0; outline: 0;
text-align: left; vertical-align: middle;
text-decoration: none; list-style: none; zoom: 1;
}
/* Layout styles */
body { min-width: 900px; }
div#wrapper { min-height: 600px; padding-left: 176px; padding-right: 301px; overflow: hidden !important; }
div.column { float: left; position: relative; padding-bottom: 20020px !important; margin-bottom: -20000px !important; }
div#content { width: 100%; min-width: 400px; }
div#sidebar { right: 276px; margin-left: -100%; _left: 201px; }
div#infobar { margin-right: -301px; }
/* Layout Styles End */
body
{ background: rgb(20, 20, 20) url("../_images/bg_main.png");
font-family: palitno linotype; color: white; font-size: 12px;
}
h1 { font-size: 20px; font-weight: normal; } h2 { font-size: 18px; font-weight: normal; } h3 { font-size: 16px; font-weight: normal; } h4 { font-size: 14px; font-weight: normal; } h5 { font-size: 12px; font-weight: normal; } h6 { font-size: 10px; font-weight: normal; }
a { color: white; position: relative; }
a:link { color: white; }
a:visited { color: rgb(205, 205, 205); }
a:hover { color: white; left: 3px; }
div#content a:hover { left: 0; }
a:active { color: white; }
a[href="index.html"], a#none, a[href="about.html"], a[href="submit.html"]
{ font-size: 14px; }
div#header
{ height: 80px;
background: rgb(27, 27, 27) url("../_images/bg_head.png") repeat-x;
border-bottom: 1px solid rgb(136, 0, 0);
overflow: hidden;
padding: 10px 40px;
} img#logo { float: left; margin-right: 100px; display: inline; }
div#content { padding: 20px 50px; text-align: center; }
h1.poemTitle { margin-bottom: 10px; text-align: left; }
p.poem { font-size: 14px; text-align: left; margin: 20px 0; line-height: 1.5; }
div#content img { margin: 10px; border: 1px solid rgb(136, 0, 0); }
div#sidebar
{ width: 150px; /* 175 - Padding-left, -right */
background: rgb(27, 27, 27);
border-right: 1px solid rgb(136, 0, 0);
padding: 10px 5px 10px 20px;
font-style: italic;
background: transparent url("../_images/bg_sidebar.png") repeat-y;
z-index: 0;
}
div#sidebar div#top
{ width: 175px; height: 200px;
position: absolute; top: 0px; left: 0; z-index: -1;
background: transparent url("../_images/bg_sidebar-top.png") no-repeat;
}
div#sidebar hr { margin: 8px -5px 8px -20px; border-top: 1px solid transparent; _border-top: 1px solid rgb(100, 0, 0); _border-bottom: 1px solid rgb(136, 0, 0); }
div#sidebar h2 { font-size: 16px; position: relative; left: -8px; }
div#sidebar h3 { font-size: 14px; }
div#sidebar li { position: relative; left: 15px; text-indent: -7px; _text-indent: 0; } /* Sets Wrap Indent. left=8+!'text-indent'; MAX 15px/-7px; */
div#sidebar ul { font-style: normal; }
div#infobar
{ width: 160px;
padding: 10px 20px;
border-left: 1px solid rgb(136, 0, 0);
background: rgb(27, 27, 27) url("../_images/bg_info.png") repeat-y;
} h1#author { position: relative; left: -10px;}
div#infobar h4 { }
div#infobar ul { position: relative; left: 10px; }
div#infobar li { white-space: normal; overflow: hidden; -o-text-overflow: ellipsis; text-overflow: ellipsis; _margin-bottom: 5px; }
h1#mark { position: relative; left: -10px; margin-top: 75px; margin-bottom: 10px; }
p#Bio { max-height: 450px; white-space: normal; }
Simple; dump support for IE 6. Youtube and many other popular sites no longer support it, even Microsoft have abandoned it -- http://ie6countdown.com/