I've tried the overflow-y: visible in css but the logo still cuts, i imagine it has something to do with the body since, in all the other pages the logo shows as i want it to.
<div class="nav-logo">
<img class="lightup-logo" src="image/logo.png" alt=""/>
</div>
.nav-logo {
float: left;
overflow-y: visible;
width: 24%;
padding: 0px;
margin: 0px;
}
On a side note the logo works as intended in all other pages, it overflows nicely, its just in the index page that the problem seems to appear.
For those who are looking for a complete code sample.
<header>
<div class="header-container">
<div class="nav-logo">
<img class="lightup-logo" src="image/logo.png" alt=""/>
</div>
</div>
</header>
<main>
<div class="body-container">
<div class="large-container"></div>
<div class="clear"></div>
</div>
</main>
header {
padding: 0px;
margin: 0px;
background: rgba(31,34,36,1);
background: -moz-linear-gradient(left, rgba(31,34,36,1) 0%, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 77%, rgba(31,34,36,1) 100%);
background: -webkit-gradient(left top, right top, color-stop(0%, rgba(31,34,36,1)), color-stop(25%, rgba(0,0,0,1)), color-stop(50%, rgba(0,0,0,1)), color-stop(77%, rgba(0,0,0,1)), color-stop(100%, rgba(31,34,36,1)));
background: -webkit-linear-gradient(left, rgba(31,34,36,1) 0%, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 77%, rgba(31,34,36,1) 100%);
background: -o-linear-gradient(left, rgba(31,34,36,1) 0%, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 77%, rgba(31,34,36,1) 100%);
background: -ms-linear-gradient(left, rgba(31,34,36,1) 0%, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 77%, rgba(31,34,36,1) 100%);
background: linear-gradient(to right, rgba(31,34,36,1) 0%, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 77%, rgba(31,34,36,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1f2224', endColorstr='#1f2224', GradientType=1 );
}
.nav-logo {
float: left;
overflow-y: visible;
width: 230px;
height: 100%;
width: 24%;
padding: 0px;
margin: 0px;
}
.header-container {
max-width: 1000px;
margin: auto;
border-left: 0px;
border-right: 0px;
border-top: 0px;
border-bottom: 1px solid transparent;
-webkit-border-image: url(/border.png) 28 stretch; /* Safari 3.1-5 */
-o-border-image: url(/border.png) 28 stretch; /* Opera 11-12.1 */
border-image: url(/border.png) 28 stretch;
}
main {
margin: 0px;
padding: 0px;
}
.large-container {
height: 478px;
background-image: url(../image/sliced1.png);
}
.body-container {
margin: auto;
max-width: 1000px;
position: relative;
}
If i add z-index: -1 to the body-container i get the result i want (logo overflows) however links in the body-containers no longer work.
screen_styles.css, line 48, remove z-index: 5px;. z-index has nothing to do with pixels.
add these rules to header line 14:
header {
position: relative;
z-index: 99;
}
That's about it. The reason why z-index did not work was because you were trying to use it on a position:static element. It only works on elements with position other than static.
Your project has quite a few errors, you should have a decent front end developer look at it before you launch, to put it mildly.
try
.nav-logo img
{
max-width: 100px; //width of div
max-height: 100px;//height of div
}
or you can make logo.png, background of div
<div class="nav-logo">
</div>
and use
.nav-logo {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url("image/logo.png");
background-repeat: no-repeat;
background-size: contain;
}
contain makes background image fill the div and not getting bigger.
Related
I need to create a responsive triangle <div>. I was able to create it using css skewed, but it is not responsive, when I change the screen width it gets messed up. Can someone help me? Thank you very much in advance!
Here is what I want:
This is the code I have so far:
.skewed-box-one:before {
background-color: red;
content: '';
height: 100px;
width: 30.05%;
display: block;
visibility: visible;
position: absolute;
top: -40px;
transform: skewY(8deg);
border-top: 3px solid #BBDEFB;
}
.skewed-box-one:after {
background-color: red;
content: '';
height: 130px;
width: 70%;
display: block;
visibility: visible;
position: absolute;
top: -46px;
right: 0;
transform: skewY(-4deg);
border-top: 3px solid #BBDEFB;
}
<div class="skewed-box-one"></div>
You could use CSS clip-path, do note that broswer support is limited. With this tool you can generate the shape you want.
.triangle1 {
clip-path: polygon(50% 0%, 100% 84%, 100% 100%, 0 100%, 0 84%);
background: red;
width: 100%;
height: 100%;
}
.triangle2 {
clip-path: polygon(50% 0%, 0% 100%, 100% 100%);;
background: red;
width: 100%;
height: 100%;
}
.container {
width: 50%;
height: 300px;
margin-bottom: 20px;
}
<div class="container">
<div class="triangle1">1</div>
</div>
<div class="container">
<div class="triangle2">2</div>
</div>
I could solve this problem with #SuperDJ help, usingclip-path. I also find this website that helps to draw shapes:
https://bennettfeely.com/clippy/
Here is the final code i used:
.triangle1 {
position: absolute;
-webkit-clip-path: polygon(21% 96%, 0 54%, 100% 54%);
clip-path: polygon(21% 96%, 0 54%, 100% 54%);
background: #BBDEFB;
width: 100%;
height: 200px;
margin-top: -40px;
}
Thanks very much everybody that tryed to help and a special thanks to #SuperDJ!
Here is another idea more supported than clip-path using background coloration
.box-down {
height:80px;
padding-bottom:50px;
background:
linear-gradient(to bottom right,red 48%, transparent 50%) bottom right/30% 50px,
linear-gradient(to bottom left ,red 48%, transparent 50%) bottom left/70.1% 50px,
red content-box;
background-repeat:no-repeat;
}
.box-up {
height:80px;
padding-top:50px;
background:
linear-gradient(to top right,red 48%, transparent 50%) top right/70% 50px,
linear-gradient(to top left ,red 48%, transparent 50%) top left /30.1% 50px,
red content-box;
background-repeat:no-repeat;
margin-top:20px;
}
<div class="box-down"></div>
<div class="box-up"></div>
I've been using the vertical spacing trick for all my div's with text in them, and while it made the vertical spacing go from 0% to 90% perfectly centered, it's leaving more space at the top of the tip then the bottom. It's doing it on every single div I used it on. I've tried setting padding/margin to 0 but nothing happened. Not sure what specifically is causing this. It's pretty irritating. Anyone have an idea?
Live example -
https://jay-portfolio.herokuapp.com/
Pic of issue -
http://i988.photobucket.com/albums/af6/jtbitt/spacing-incorrect_zps0hjolnyv.png
HTML -
<section id="about" ng-controller="aboutController">
<div class="container-fluid">
<div class="row about-row">
<div class="about-left col-xs-12 col-md-6">
</div>
<div class="about-right col-xs-12 col-md-6">
<div class="about-content">
<div class="about-content-title">
<h1><strong>I'M JAY.</strong></h1>
</div>
<div class="about-content-info">
<p ng-if="about.firstParagraph">{{ about.paragraphOne }}</p>
<p ng-if="!about.firstParagraph">{{ about.paragraphTwo }}</p>
</div>
<div class="about-button">
<button ng-if="about.firstParagraph" class="label label-success" ng-click="about.switchParagraph()">MORE =></button>
<button ng-if="!about.firstParagraph" class="label label-success">VIEW SKILLS</button>
</div>
<div class="about-personal-info">
<h4>Email: jaybittner#gmail.com</h4>
</div>
<div class="about-icon">
<img ng-src="{{ profile.icon }}" />
</div>
</div>
</div>
</div>
</div>
</section>
CSS -
#about {
height: 100%;
width: 100%;
background: rgba(0,97,65,1);
background: -moz-linear-gradient(left, rgba(0,97,65,1) 0%, rgba(54,135,95,1) 7%, rgba(36,123,85,1) 22%, rgba(0,97,65,1) 53%, rgba(34,121,84,1) 76%, rgba(54,135,95,1) 90%, rgba(54,135,95,1) 100%);
background: -webkit-gradient(left top, right top, color-stop(0%, rgba(0,97,65,1)), color-stop(7%, rgba(54,135,95,1)), color-stop(22%, rgba(36,123,85,1)), color-stop(53%, rgba(0,97,65,1)), color-stop(76%, rgba(34,121,84,1)), color-stop(90%, rgba(54,135,95,1)), color-stop(100%, rgba(54,135,95,1)));
background: -webkit-linear-gradient(left, rgba(0,97,65,1) 0%, rgba(54,135,95,1) 7%, rgba(36,123,85,1) 22%, rgba(0,97,65,1) 53%, rgba(34,121,84,1) 76%, rgba(54,135,95,1) 90%, rgba(54,135,95,1) 100%);
background: -o-linear-gradient(left, rgba(0,97,65,1) 0%, rgba(54,135,95,1) 7%, rgba(36,123,85,1) 22%, rgba(0,97,65,1) 53%, rgba(34,121,84,1) 76%, rgba(54,135,95,1) 90%, rgba(54,135,95,1) 100%);
background: -ms-linear-gradient(left, rgba(0,97,65,1) 0%, rgba(54,135,95,1) 7%, rgba(36,123,85,1) 22%, rgba(0,97,65,1) 53%, rgba(34,121,84,1) 76%, rgba(54,135,95,1) 90%, rgba(54,135,95,1) 100%);
background: linear-gradient(to right, rgba(0,97,65,1) 0%, rgba(54,135,95,1) 7%, rgba(36,123,85,1) 22%, rgba(0,97,65,1) 53%, rgba(34,121,84,1) 76%, rgba(54,135,95,1) 90%, rgba(54,135,95,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#006141', endColorstr='#36875f', GradientType=1 );
background-repeat: no-repeat;
color: #101010;
border-bottom: 3px solid black;
}
#about .container-fluid, #about .row {
height: 100%;
}
.about-left {
height: 100%;
background-image: url('../../images/jay-ocean.jpg');
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
border-right: 3px solid #101010;
}
.about-right {
height: 100%;
width: 50%;
text-align: center;
position: relative;
}
.about-content {
width: 50%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
margin-left: auto;
margin-right: auto;
}
.about-content-title h1{
font-size: 3.1vw;
margin-bottom: 0.6vh;
}
.about-content-info p {
font-size: 1vw;
word-spacing: 0.3vw;
margin-bottom: 0.7vh;
}
.about-button button {
margin-bottom: -0.1vh;
}
.about-personal-info h4 {
margin-bottom: 0.7vh;
}
.about-button button {
color: gray;
border: 1px solid #101010;
background-color: #101010;
font-size: 0.7vw;
}
.about-button a {
color: gray;
}
.about-personal-info h4 {
font-size: 1vw;
word-spacing: 0.3vw;
}
.about-icon img {
height: 3.5vh;
width: 1.75vw;
border-radius: 10px;
border: 1px solid #101010;
margin: 3px;
}
#media only screen and (max-width: 992px) {
.about-left {
height: 50%;
border-bottom: 3px solid black;
}
.about-right {
height: 50%;
width: 100%;
}
.about-content {
width: 70%;
}
.about-content-title h1 {
font-size: 5vw;
}
.about-content-info p {
font-size: 2.5vw;
}
.about-button button {
font-size: 2.5vw;
}
.about-personal-info h4 {
font-size: 2.5vw;
}
.about-icon img {
height: 20px;
width: 20px;
}
}
Try adding *{margin:0px; padding:0px;} to your stylesheet and then edit your div tags from there. Good luck.
You can use a css trick for vertical center a div in another div:
#outerdiv {
width: 700px;
margin-left: auto;
margin-right: auto;
height: 400px;
position: relative;
background: #eee;
text-align: center;
}
#innerdiv{
width: 240px;
height:100px;
position: absolute;
top: 50%;
left: 50%;
margin-left: -120px;/* half of #innerdiv width*/
margin-top: -50px;/* half of #innerdiv height*/
background: #ccc;
}
<div id="outerdiv">
<div id="innerdiv">Centered div</div>
</div>
The answer turned out to be that I needed to add 'margin-top: 0' to .about-content-title h1. There was an extra space above the h1 which was causing the content div to have extra blank space at the top of it. The div was centered but had blank space inside of it. This fixed it.
.about-content-title h1 {
font-size: 3.1vw;
margin-bottom: 0.6vh;
margin-top: 0;
}
I'm creating an iMessages like view of some data showing outgoing and incoming messages - I found a nice CSS solution here:
http://cssdeck.com/labs/6mifhkdc
One missing part that I need is the ability to show the timestamps when messages were sent/received - like you get in iMessages when you swipe a message to the left. I have the timestamps stored and ready to display, I just need some guidance on the CSS to use to make them appear like they do in iMessages.
(the timestamps will appear permanently on the page - no swiping involved)
I'm a newbie at CSS so not sure where to start to add this type of attribute.
Here's a sample of how my page currently looks:
<!DOCTYPE html>
<html lang="en">
<head>
<title>fmSMS Chat Thread</title>
<style type="text/css">
/* Bit of normalisation */
/* Inspired by: http://cssdeck.com/labs/6mifhkdc */
body {
background-color: #eee;
color: #222;
font: 0.8125em/1.5 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
img {
display: block;
height: auto;
max-width: 100%;
}
.container {
padding: 40px 20px;
margin: 0 auto;
width: 400px;
}
/* .bubble */
.bubble {
background-image: linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -o-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -moz-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -ms-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.25, rgb(210,244,254)),
color-stop(1, rgb(149,194,253))
);
border: solid 1px rgba(0, 0, 0, 0.5);
/* vendor rules */
border-radius: 20px;
/* vendor rules */
box-shadow: inset 0 5px 5px rgba(255, 255, 255, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2);
/* vendor rules */
box-sizing: border-box;
clear: both;
float: left;
margin-bottom: 20px;
padding: 8px 30px;
position: relative;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
width: auto;
max-width: 100%;
word-wrap: break-word;
}
.bubble:before, .bubble:after {
border-radius: 20px / 10px;
content: '';
display: block;
position: absolute;
}
.bubble:before {
border: 10px solid transparent;
border-bottom-color: rgba(0, 0, 0, 0.5);
bottom: 0;
left: -7px;
z-index: -2;
}
.bubble:after {
border: 8px solid transparent;
border-bottom-color: #d2f4fe;
bottom: 1px;
left: -5px;
}
.bubble--green {
background-image: linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -o-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -moz-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -ms-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.25, rgb(172,228,75)),
color-stop(1, rgb(122,205,71))
);
float: right;
}
.bubble--green:before {
border-bottom-color: rgba(0, 0, 0, 0.5);
border-radius: 20px / 10px;
left: auto;
right: -7px;
}
.bubble--green:after {
border-bottom-color: #ace44b;
border-radius: 20px / 10px;
left: auto;
right: -5px;
}
</style>
</head>
<body>
<div class="container">
<div class="bubble">
This is a sample outgoing message
</div>
<div class="bubble bubble--green">
Here's the first reply
</div>
<div class="bubble">
Here's the next sent message
</div>
<div class="bubble bubble--green">
And the final reply
</div>
</div>
</body>
</html>
You can not use CSS to add timestamps. Generate the timestamp from javascript or get it from the API and then add it to your DOM.
First add the timestamp to your application using the Javascript attribute Date.now. Then make it look pretty using CSS. CSS will only control the way elements look in your application, it's not the language to use to add elements to your application.
Found this which was close to what I was after:
http://cssdeck.com/labs/pmbrpxle
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
i want to use color gradient on my top border
i have used this site for generate Gradient color i have done copy and past for code css and i had replaced background with border-top-color :
its my project :
Jsfiddle
this is the PSD FILE :
PSD FILE
HTML
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset=utf-8>
<link rel="stylesheet" href="css/styles.css" type="text/css" media="screen">
</head>
<body>
<script src="js/jquery.js"></script>
<script src="js/carousel.js"></script>
<div id="wrap">
<div id="carousel" >
<div class="title">
Welcome to ...
</div>
</div>
</div>
</body>
</html>
CSS
#wrap {
position: relative;
width: 1100px;
}
#wrap:after {
position: absolute;
bottom: -95px;
z-index: 9999;
content: " ";
height: 100px;
width: 100%;
background: url('http://s14.postimg.org/7tmkd1hfl/shadow.png') no-repeat center;
background-size: cover;
}
#carousel {
border:solid 1px #1a1a1a;
position:relative;
width:903px;
height:299px;
margin:0 auto;
margin-top: 50px;
background:url(http://s22.postimg.org/l2e24m48x/light.png);
}
body {
background-color: #c7c7c7;
}
.title {
position:absolute;
width:883px;
height:47px;
bottom: 0;
left:0;
line-height: 47px;
border-top:solid 1px ;
border-top-color: rgba(240,240,240,1);
border-top-color: -moz-linear-gradient(left, rgba(240,240,240,1) 0%, rgba(240,240,240,1) 20%, rgba(250,250,250,1) 22%, rgba(250,250,250,1) 71%, rgba(230,230,230,1) 97%, rgba(230,230,230,1) 100%);
border-top-color: -webkit-gradient(left top, right top, color-stop(0%, rgba(240,240,240,1)), color-stop(20%, rgba(240,240,240,1)), color-stop(22%, rgba(250,250,250,1)), color-stop(71%, rgba(250,250,250,1)), color-stop(97%, rgba(230,230,230,1)), color-stop(100%, rgba(230,230,230,1)));
border-top-color: -webkit-linear-gradient(left, rgba(240,240,240,1) 0%, rgba(240,240,240,1) 20%, rgba(250,250,250,1) 22%, rgba(250,250,250,1) 71%, rgba(230,230,230,1) 97%, rgba(230,230,230,1) 100%);
border-top-color: -o-linear-gradient(left, rgba(240,240,240,1) 0%, rgba(240,240,240,1) 20%, rgba(250,250,250,1) 22%, rgba(250,250,250,1) 71%, rgba(230,230,230,1) 97%, rgba(230,230,230,1) 100%);
border-top-color: -ms-linear-gradient(left, rgba(240,240,240,1) 0%, rgba(240,240,240,1) 20%, rgba(250,250,250,1) 22%, rgba(250,250,250,1) 71%, rgba(230,230,230,1) 97%, rgba(230,230,230,1) 100%);
border-top-color: linear-gradient(to right, rgba(240,240,240,1) 0%, rgba(240,240,240,1) 20%, rgba(250,250,250,1) 22%, rgba(250,250,250,1) 71%, rgba(230,230,230,1) 97%, rgba(230,230,230,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f0f0f0', endColorstr='#e6e6e6', GradientType=1 );
color:#ffffff;
font-size: 12 ;
padding-left: 19px;
font-style: Arial;
text-transform: uppercase;
background:url(images/title.png) bottom left repeat;
}
so my probleme is that i don't have gradient color but just white color
Demo
Best way is to use <hr>
css
top_line {
position:absolute;
bottom: 47px;
height: 1px;
width: 100%;
border: 0;
margin:0;
background: black;
background: -webkit-gradient(linear, 0 0, 100% 0, from(transparent), to(transparent), color-stop(50%, white));
}
html
<div id="wrap">
<div id="carousel">
<hr class="top_line" />
<div class="title">Welcome to ...</div>
</div>
</div>
You can also do this with Read here
From given psd
there are 3 elements basically
gradient block
gradient top border
3 sides border gradient
From my demo above you get the #2, #3 is already achieved, #1 is achieved if you follow the link I have attached to read.
Here is your psd parts
Well, you can do it this way
HTML:
<div class="title">
<div class='backTitle'></div>
Welcome to ...
</div>
CSS:
.backTitle {
width: 100%;
height: 5px;
position: absolute;
background: linear-gradient(90deg, #888, #cccccc, #888);
margin-left: -19px;
margin-top: -5px;
}
.title {
position:absolute;
width:883px;
height:47px;
bottom: 0;
left:0;
line-height: 47px;
border-top:solid 5px black;
color:#ffffff;
font-size: 12 ;
padding-left: 19px;
font-style: Arial;
text-transform: uppercase;
background:url(http://s22.postimg.org/s4bzqt7up/title.png) bottom left repeat ;
}
HTML:
<div id="wrap">
<div id="main">
<p id="title">home</p>
</div>
</div>
CSS:
body,div,dl,dt,dd,ol,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
margin:0;
padding:0;
}
html, body {
height:100%;
margin:0;
padding:0;
}
#wrap {
background-image: -ms-radial-gradient(center, circle farthest-corner, #FFFFFF 0%, #0662BF 100%);
background-image: -moz-radial-gradient(center, circle farthest-corner, #FFFFFF 0%, #0662BF 100%);
background-image: -o-radial-gradient(center, circle farthest-corner, #FFFFFF 0%, #0662BF 100%);
background-image: -webkit-gradient(radial, center center, 0, center center, 506, color-stop(0, #FFFFFF), color-stop(1, #0662BF));
background-image: -webkit-radial-gradient(center, circle farthest-corner, #FFFFFF 0%, #0662BF 100%);
background-image: radial-gradient(circle farthest-corner at center, #FFFFFF 0%, #0662BF 100%);
height:100%;
padding:0;
margin:0;
}
#main {
height: 100%;
margin-right: 15%;
margin-left: 15%;
border-right: 1px solid gray;
border-left: 1px solid gray;
padding: 0px 15px 15px 15px;
background-color: #FFFFFF;
text-align: center;
}
I feel dumb asking questions like this because I feel like the answer is extremely simple, but my main div is longer than the wrap and I don't understand why. I could just make the main div shorter so it matches the wrap, but I want to do it properly.
JSFiddle
Your #main-div has a padding of 15px on the bottom.
Add this to your css:
padding: 0;
Or better modify your css-code from padding: 0px 15px 15px 15px; to
padding: 0px 15px 0px 15px;
See your updated fiddle here: http://jsfiddle.net/k7tRy/
Because of padding.
Remove bottom padding, or add to #main
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
Your div #main have some padding-bottom.
In your Css class : padding: 0px 15px 15px 15px;.
It means :
padding-top: 0px;
padding-right: 15px;
padding-bottom: 15px;
padding-left: 15px;
And your div takes more than 100% because of padding property.
(Padding: Padding is extra space inside the control.)
You should/can use margin instead of padding.
<style>
body,div,dl,dt,dd,ol,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
margin:0;
padding:0;
}
html, body {
height:100%;
margin:0;
padding:0;
}
#wrap {
background-image: -ms-radial-gradient(center, circle farthest-corner, #FFFFFF 0%, #0662BF 100%);
background-image: -moz-radial-gradient(center, circle farthest-corner, #FFFFFF 0%, #0662BF 100%);
background-image: -o-radial-gradient(center, circle farthest-corner, #FFFFFF 0%, #0662BF 100%);
background-image: -webkit-gradient(radial, center center, 0, center center, 506, color-stop(0, #FFFFFF), color-stop(1, #0662BF));
background-image: -webkit-radial-gradient(center, circle farthest-corner, #FFFFFF 0%, #0662BF 100%);
background-image: radial-gradient(circle farthest-corner at center, #FFFFFF 0%, #0662BF 100%);
height:100%;
padding:0;
margin:0;
}
#main {
height: 100%;
margin-right: 15%;
margin-left: 15%;
border-right: 1px solid gray;
border-left: 1px solid gray;
<!-- Check the change -->
padding: 0px 15px 0px 15px;
background-color: #FFFFFF;
text-align: center;
}
</style>
<div id="wrap">
<div id="main">
<p id="title">home</p>
</div>
</div>
I agree to the above developers. It just because you are giving an extra padding at the bottom of your main div.
Just for the caution, always check the conventions while coding:
padding: top-padding, right-padding, bottom-padding,left-padding.
(Just to remember: it works in a clockwise fashion)
Hope it helps. Happy Coding :)