I have a empty space I can't remove - html

I can't find any relevant CSS padding, margins, etc. causing this empty space.
The main page has a middle bar(testimonials) portion that when removed for the sub pages still leaves a noticeable empty space. The elements below are positioned relatively in two columns but they're moving up pushing up.
Main page
http://teetime.comeze.com/
Sub page example:
http://teetime.comeze.com/pestcontrol.html
Relevant CSS:
.container {
width: 1030px;
margin: 0 auto;
z-index: 2;
}
.header {
}
.content {
z-index: 3;
margin: 1px;
padding-top: 1px;
padding-right: 0;
padding-bottom: 1px;
padding-left: 0;
}
#apDiv5 {
position: absolute;
width: 942px;
height: 322px;
z-index: 1;
clear: both;
}
.column1 {
height: 700px;
width: 490px;
float: left;
margin-left: 25px;
position: relative;
padding-top: 17px;
}
.column2 {
height: 700px;
width: 480px;
float: left;
margin-left: 10px;
position: relative;
padding-top: 20px;
border: none;
}
.form {
font-family: kreon;
line-height: normal;
height: 363px;
width: 293px;
/* [disabled]padding-left: 600px; */
font-size: 100%;
z-index: 100;
text-indent: 0px;
padding-top: 0px;
color: #700CAF;
text-align: left;
letter-spacing: 1.4px;
background-image: url(teetimefinal.png);
#mail {
left: 600px;
position: relative;
}
Here is html code (from end of header to start of the two columns):
<div class="content">
<div id="apDiv5"><img src="mole.png" width="902" height="320" alt="mole"></div>
<form action="form-to-email.php" method="post" enctype="application/x-www-form-urlencoded" target="_self" class="form" id="mail" title="mail">
<h2><br>
Free Estimate</h2><table width="234" border="0" cellpadding="3" cellspacing="3" summary="form">
<tr>
<th scope="row"> <label>Name
<input name="Name" type="text" class="space" id="Name">
<br>
</label> </th>
</tr>
<tr>
<th scope="row"> <label>Email
<input name="Email" type="text" class="space" id="Email">
<br>
</label> </th>
</tr>
<tr>
<th scope="row"> <label>Street
<input name="Street" type="text" class="space" id="Street">
<br>
</label> </th>
</tr>
<tr>
<th scope="row"> <label>Phone
<input name="Phone" type="text" class="space" id="Phone">
<br>
</label> </th>
</tr>
<tr>
<th scope="row"> <label>Zip
<input name="zip" type="text" class="space" id="zip">
<br>
</label> </th>
</tr>
<tr>
<td scope="row"> <div align="center">
<input type="submit" class="sub1" id="Sub" style="button" value="Submit">
</div></td>
</tr>
</table>
</form>
<div class= "column1"><img src="/writing.png" width="493" height="653" alt="writing">
<div id="apDiv14">
<h3>Seven-Step Fertilization Program<br>

The free estimate widget on the right hand side has a set height on line 147 of index.css
Just reduce this to remove the extra space.

Like Drawdesign mentioned, it looks like you're declaring a set height on .form in your index.css file. Alter that height, and you'll alter that gap.

Related

Html formet is not behaving proper while sending it as a mail using java mail api, SMTP Protocal

I am using JavaMail API for sending mail. In my mail, I have to attach HTML content.
I am using the following code to prepare HTML.
<html>
<head>
<style>
input[type=text],
select,
textarea {
padding: 12px 30px;
margin: px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
background-color: white;
color: black;
font-size: 75%;
}
input[type=text],
select .longText {
width: 100%;
}
textarea.longText {}
.processDetails {
background-color: #f2f2f2;
width: 80%;
}
div {
border-radius: 5px;
padding: 20px;
}
textarea#description {
margin-left: 4%;
}
.center {
margin: auto;
width: 50%;
box-sizing: border-box;
border-radius: 4px;
padding: 0;
text-align: center;
margin-top: 6px;
}
label {
margin-left: 5%;
color: blue
}
#centerBody {
margin: auto;
width: 100%;
box-sizing: border-box;
border-radius: 4px;
padding: 0;
text-align: center;
margin-top: 6px;
}
</style>
</head>
<body>
<div class="processDetails">
<div class="center">
<table>
<tr>
<td width="40%">
<label for="process"> Name</label>
</td>
<td width="60%">
<input type="text" class="longText" value=DSDS disabled>
</td>
</tr>
</table>
</div>
<div class="centerBody">
<table id="processTable">
<tr>
<td width="20%">
<label for="processProperties">Code</label>
</td>
<td width="28%">
<input type="text" value=TAWELC disabled>
</td>
<td width="20%">
<label for="processProperties">City</label>
</td>
<td width="28%">
<input type="text" value=Lucknow disabled>
</td>
</tr>
<tr>
<td width="20%">
<label for="processProperties">Organisation</label>
</td>
<td width="28%">
<input type="text" value=HR disabled>
</td>
<td width="20%">
<label for="processProperties">Email</label>
</td>
<td width="28%">
<input type="text" value=vishal.something#gmail.com disabled>
</td>
</tr>
</table>
<table>
<tr>
<td width="19%">
<label for="description">Adress</label>
</td>
<td width=68%>
<textarea class="longText" cols=65% style="height:50px;margin-left: 5%;resize: none; position: fixed;" disabled>asd</textarea>
</td>
<td width=24%></td>
</tr>
</table>
</div>
</div>
</body>
</html>
When I sent this as a mail body, I found that the behavior of the HTML content is not the same in Browser and Outlook Applications.
I can see text area alignment differences when I open mail in the Microsoft outlook application.
Please let me know what is wrong here or how can I fix the issue.
Regards,
Vishal

Trying to display div over table

I have tried to display div over table using z-index. I have searched on google about z-index. The information i got that z-index will only work on an element whose position property has been explicitly set to absolute , fixed , or relative. But it is still not working for me.
Please check my code and please explain what is the issue.
.task {
position: relative;
z-index: 1;
}
#check_filter {
width: 200px;
padding: 20px;
float: left;
position: absolute;
z-index: 2!important;
margin-left: 60px;
margin-top: 7px;
box-shadow: 1px 0px 20px 1px grey;
}
#radio_filter {
width: 200px;
padding: 20px;
float: left;
position: absolute;
z-index: 2!important;
margin-left: 180px;
margin-top: 7px;
box-shadow: 1px 0px 20px 1px grey;
}
Filters: Assigned To | Done
<div id="check_filter">
<div class="checkbox">
<label><input type="checkbox" value="">Option 1</label>
</div>
</div>
<div id="radio_filter">
<div class="radio">
<label><input type="radio" name="yes">Yes</label><br>
<label><input type="radio" name="no">No</label>
</div>
</div>
<br>
<table class="task" style="margin-top:30px; width:100%!important;">
<thead>
<tr style="background-color:black;color:white;">
<th>Task id</th>
<th>Task name</th>
<th>Task description</th>
<th>Assigned to</th>
<th>Done(yes/no)</th>
<th>Action</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
Your DIVs are already over table. You can't notice it, because the background of DIVs is transparent... To see/understand that, add background to DIVs.
.task {
position: relative;
z-index: 1;
}
#check_filter {
width: 200px;
padding: 20px;
float: left;
position: absolute;
z-index: 2!important;
margin-left: 60px;
margin-top: 7px;
box-shadow: 1px 0px 20px 1px grey;
}
#radio_filter {
width: 200px;
padding: 20px;
float: left;
position: absolute;
z-index: 2!important;
margin-left: 180px;
margin-top: 7px;
box-shadow: 1px 0px 20px 1px grey;
}
[id$="filter"] {
background: white
}
Filters: Assigned To | Done
<div id="check_filter">
<div class="checkbox">
<label><input type="checkbox" value="">Option 1</label>
</div>
</div>
<div id="radio_filter">
<div class="radio">
<label><input type="radio" name="yes">Yes</label><br>
<label><input type="radio" name="no">No</label>
</div>
</div>
<br>
<table class="task" style="margin-top:30px; width:100%!important;">
<thead>
<tr style="background-color:black;color:white;">
<th>Task id</th>
<th>Task name</th>
<th>Task description</th>
<th>Assigned to</th>
<th>Done(yes/no)</th>
<th>Action</th>
</tr>
</thead>
<tbody>
</tbody>
</table>

Content in absolute positioned div is overflowing

I have a weird question, and perhaps it's more suitable for the CSS fans out there, but why would content inside an absolute positioned div overflow out past everything else?
The example provided here (as a picture) shows that the content overflows out the blue bordered div. The content inside this box should rightfully define the the div's height no? How can this be remedied so that my 'blue' box fits to its content?
Here's the markup in question:
* {
box-sizing: border-box;
font-family: Verdana, Arial, sans-serif;
font-size: 9pt;
}
html {
height: 100%;
}
body {
margin: 0;
padding: 0;
height: 100%;
background: rgb(105, 105, 105);
}
#table-container {
display: table;
text-align: center;
width: 100%;
height: 100%;
}
#container {
display: table-cell;
vertical-align: middle;
}
#wrapper {
padding: 25px;
}
.tabs {
position: relative;
margin: 40px 0 25px;
}
.tab {
float: left;
}
.tab label {
background: rgb(105, 105, 105);
padding: 10px;
border: 1px solid transparent;
color: #FFF;
margin-left: -1px;
position: relative;
left: 1px;
top: -26px;
}
.tab label:hover {
background: #000;
}
.tab [type=radio] {
display: none;
}
.content {
position: absolute;
top: -1px;
left: 0;
background: rgb(222, 222, 222);
right: 0;
bottom: 0;
padding: 20px;
border: 1px solid transparent;
opacity: 0;
color: rgb(58, 58, 58);
}
[type=radio]:checked~label {
background: rgb(222, 222, 222);
font-weight: bold;
border-bottom: 1px solid transparent;
color: #000;
z-index: 2;
}
[type=radio]:checked~label~.content {
z-index: 1;
opacity: 1;
}
/* CSS for Table and Field styling */
.table {
width: 100%;
padding: 0;
margin: 0;
text-align: left;
}
.table td {
border: 1px solid #000;
}
.inputbox {
border: 1px solid rgb(170, 170, 170);
width: 100%;
}
.inputbox:hover {
border: 1px solid rgb(109, 109, 109);
}
.input {
border-style: none;
border-color: inherit;
border-width: 0;
padding: 3px;
height: 20px;
}
input[type="text"],
textarea {
width: 100%;
box-sizing: border-box;
}
.input:focus {
background: rgb(255, 255, 196);
}
<div id="table-container">
<div id="container">
<div id="wrapper">
<div style="border: 1px solid red; text-align: left; font-size: 8pt; color: #fff;">Choose language/Choisissez langue:</div>
<div style="border: 1px solid blue; height: 100%;">
<div class="tabs">
<!-- TAB [1] -->
<div class="tab">
<input type="radio" id="tab-1" name="tab-group-1" checked><label for="tab-1">English</label>
<div class="content">
<table class="table">
<tr>
<td>Traveller's Name:</td>
<td colspan="2">
<div class="inputbox"><input type="text" id="tname" class="input" name="Name of Traveler" tabindex="1" /></div>
</td>
<td style="width: 15%;"></td>
<td>Tan #:</td>
<td></td>
</tr>
<tr>
<td>Destination:</td>
<td colspan="2">
<div class="inputbox"><input type="text" id="location" class="input" name="Location" tabindex="2" /></div>
</td>
<td></td>
<td>Status:</td>
<td></td>
</tr>
<tr>
<td>iTravel Trip Number:</td>
<td colspan="2">
<div class="inputbox"><input type="text" id="location" class="input" name="Location" tabindex="2" /></div>
</td>
<td></td>
<td>Date Issued:</td>
<td>
<div class="inputbox"><input type="text" id="dissued" class="input" disabled/></div>
</td>
</tr>
<tr>
<td>Event Plan ID Code:</td>
<td colspan="2">
<div class="inputbox"><input type="text" id="evt-plan-code" class="input" name="Event Plan ID Code" tabindex="4" /></div>
</td>
<td></td>
<td>Issued by:</td>
<td>
<div class="inputbox"><input type="text" id="issuer" class="input" disabled/></div>
</td>
</tr>
<tr>
<td>Dates of Travel</td>
<td>From:</td>
<td>
<div id="ddate" name="Departure Date" tabindex="5"></div>
</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td> </td>
<td>To:</td>
<td>
<div id="rdate" name="Return Date" tabindex="6"></div>
</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Trip Purpose</td>
<td colspan="3"></td>
<td></td>
<td></td>
</tr>
<tr>
<td> </td>
<td colspan="2"> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</div>
</div>
<div class="tab">
<input type="radio" id="tab-2" name="tab-group-1"><label for="tab-2">Français</label>
<div class="content">
tab2
</div>
</div>
</div>
</div>
<div style="border: 1px solid green; text-align: left;">
<input type="button" value="Issue TAN" id="issue">
<input type="button" value="Reset form" id="issue">
<input type="button" value="Save changes" id="issue">
</div>
</div>
<!-- end of div #wrapper -->
</div>
<!-- end of div #container -->
</div>
<!-- end of div #table-container -->
The absolute-positioned div doesn't affect the container div's size since setting position to absolute removes it from the document flow. It's essentially the same behaviour as when position is set to fixed, except it stays at the same place in the page when you scroll. More info can be found here and here.
As for how to fix the height of your div, the short answer is that it can't be done with CSS unless you use a different value for position, perhaps relative in your case but that will depend on the structure of your html. This question covers some other ways that you could go about it.

Responsive Image scaled Too Big On Mobile

I'm trying to make this landing page responsive: http://www.homeimprovementquotes.co.uk/2016newsletters/Company/landingpages/blackfriday-BIG.html
But on mobile the image is now well over the width of the screen when it is in portrait, meaning you have to scroll to view the images and the form. I usually only do the coding for emails and I'm pretty much ripping out my hair at this point. Any help would be appreciated.
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="HandheldFriendly" content="true">
<style type="text/css">
body { font-family: Helvetica,Arial,sans-serif }
div { border: none }
#outer { width: 100% }
#splashdiv { float: left }
#formdiv { float: left; height: 600px; background-color: #000000 }
#pelogo { padding-bottom: 1em }
.blackbg { background-color: #000000; text-align: center }
.centre { text-align: center }
#theform { display: inline-block; border: 2x solid #ff0000; padding: 1em auto 0px auto;
background-color: #ffffff; opacity: 1;
text-align: center }
#thetable { margin-top: 1.5em }
.prompt { text-align: right; padding: .4em .25em .4em 1em }
.response { text-align: left; padding: .4em 1em .4em .25em }
.gobutton { text-align: center; padding-top: 1em; padding-bottom: 1em }
.redsubmit { border: 1px solid #ff0080; border-radius: 8px; background-color: #ff0000;
padding: 2px .5em; color: #ffffff; font-weight: bold; font-size: 200% }
#media only screen and (max-width: 600px) {
img#beast {width: 100%; margin: 0; padding; 0;}}
Here are the other bits
<body>
<div id="outer">
<div id="splashdiv">
<img src="http://www.homeimprovementquotes.co.uk/2016newsletters/Company/landingpages/peep.png" width="690px" id="beast"/>
</div>
<div id="formdiv">
<div class="blackbg">
<div id="pelogo">
<img src="http://www.homeimprovementquotes.co.uk/2016newsletters/Company/landingpages/pebf_sq1.png" width="690px" id="beast"/>
</div>
<div>
<form id="theform" action="http://priceengines.co.uk/cgi-bin/signup" method="post" onsubmit="return check_form()">
<table id="thetable" border="0">
<tr>
<th class="prompt">Contact Name</th>
<td class="response"><input type="text" name="name" id="name" size="20" placeholder="Contact Name" /></td>
</tr>
<tr>
<th class="prompt">Company Name</th>
<td class="response"><input type="text" name="compname" id="compname" size="20" placeholder="Company Name" /></td>
</tr>
<tr>
<th class="prompt">Contact Number</th>
<td class="response"><input type="tel" name="tel" id="tel" size="20" placeholder="Contact Number" /></td>
</tr>
<tr>
<th class="prompt">E-Mail Address</th>
<td class="response"><input type="email" name="email" id="email" size="20" placeholder="E-mail" /></td>
</tr>
<tr>
<td colspan="2" class="gobutton"><input class="redsubmit" type="submit" name="go" value="Get FREE leads!" /></td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
</body>
Theming emails is always a pain in the ass.
But you can try to add a max-width to your email container. I usually set mine on 600px.
Also try to use breakpoints to make it responsive. And you can give the img a max-width:100%or to any value you like.
add max-width: 100% to the img

Why I have ugly spaces in my table

I have this HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<script type='text/javascript' src='js/jquery-1.10.2.min.js'></script>
<script type='text/javascript' src='js/knockout-3.0.0.js'></script>
<script type='text/javascript' src='js/myTasks.js'></script>
<link rel="stylesheet" type="text/css" href="css/walk.css">
<TITLE>Your Tasks</TITLE>
</HEAD>
<BODY>
<div class="screenSection">
<div class="sectionHeader">
<p>Your Tasks</p>
</div>
<div class="lines">
<table class="dataTable" id="CADataTable">
<thead>
<tr>
<th style="width: 15em;"> Project name</th>
<th style="width: 7em;"> Number</th>
<th style="width: 50em;"> description</th>
<th style="width: 5em;"></th>
</tr>
</thead>
<tbody data-bind="foreach: Assimilation">
<tr>
<td><input type="text" name="Name" id="Name" data-bind="value: Name" style="width: 15em;"></td>
<td><input type="text" name="Num" data-bind="value: Num" style="width: 7em;"></td>
<td><input type="text" name="Desc" data-bind="value: Desc" style="width: 50em;"></td>
<td style="width: 5em;">
<img src="img/close.jpg" alt="Close" data-bind="click: $root.removeAssimilation">
</td>
</tr>
</tbody>
</table>
<button type="button" id="export" class="button" data-bind="click: newAssimilation">Add new row</button>
</div>
</div>
</BODY>
</HTML>
Now everything is ok, but when I press the add new row button, I'm getting this ugly thing:
I'm using this css:
#CHARSET "UTF-8";
.formElement { height: auto; margin: 0 0.4em; padding: 0 0 0.5em 0.5em; min-width: 40%; display: inline-block;}
.formElement label {
display: block;
font-size: 1.7em;
margin: 0.8em 0 0.1em 0.15em;
width: 17.89em;
}
.formElement textarea { border: 1px solid #CCCCCC; padding: 2px; font-size: 1.15em; }
.formElement span { font-size: 1.05em; font-weight: bold; }
.lines { overflow: hidden; }
#commentInformation .formElement { width: 80%; }
input[type="text"] { border: 1px solid #CCCCCC; padding: 0.2em; height: 22px; width: 250px }
fileSelection { width: 50em; height: 30px; }
input:focus,textarea:focus,select:focus{
-webkit-box-shadow:0 0 6px #007eff;
-moz-box-shadow:0 0 5px #007eff;
box-shadow:0 0 5px #007eff; outline: none; }
td
{
background: #A9D0F5;
text-align: center;
height:2em;
}
th
{
height:2em;
}
.trClass
{
height:2em;
white-space: nowrap;
}
table
{
width: 98%;
font-size: 1.2em;
clear: both;
}
What I'm trying to do is to remove the blue space.
I'm 1000% sure that I'm making a small mistake somewhere, but it is my first css try. I'm a backend developer and it is really hard for me to spot any non sense things in the code. Please help me!
EDIT:
JSFIDDLE
Try this fiddle http://jsfiddle.net/37sbw/5/
you need to remove the
background: #A9D0F5;
applied for td
keep it like this
td
{
//background: #A9D0F5;
text-align: center;
height:2em;
}
I have even added
cellspacing="0px"
to the table to remove the spacing between the cells.
If cellspacing is not applied then go for this
table
{
border-spacing:0px;
}
Make Cell Spacing & Cell Padding as 0px
I am guessing you mean that the input field doesn't take up all the parent's width.
You have specified inline-style. This will override the CSS you've put in a seperate sheet.
<td><input type="text" name="Name" id="Name" data-bind="value: Name" style="width: 15em;"></td>
<td><input type="text" name="Num" data-bind="value: Num" style="width: 7em;"></td>
<td><input type="text" name="Desc" data-bind="value: Desc" style="width: 50em;"></td>
<td style="width: 5em;">
<img src="img/close.jpg" alt="Close" data-bind="click: $root.removeAssimilation">
</td>
Get rid of all the occurences of style="" and it should work as you expect it to work.
Additionally, change your CSS to this:
input[type="text"] {width: 100%;}
Set border-spacing of your table to 0:
table {
width: 98%;
font-size: 1.2em;
clear: both;
border-spacing: 0;
}
This will get rid of your white space between the cells.
jsFiddle