Padding statement transition with background and image and text? - html

[Note: scroll to the bottom to see exactly what I need]
I am trying to do some kind of simple decoration to my image in HTML. The decoration is to show information about the image with sliding animation only when hovered with the mouse. I tried to make it, but at some point I couldn't figure out how to put the text information in the slider. I tried to make <div> tag to put the text, but it's shows only under the image. While in my situation, I want it to be perfectly behind it.
Here is how I made them:
img.img1, div.img1 {
width: 150px;
margin: 5px 0px 5px 0px;
border: 10px solid rgb(0,0,150);
background: rgb(0,0,150);
padding-right: 0px;
transition: 0.5s;
color: #fff;
font-size: 12px;
writing-mode: vertical-rl;
text-orientation: mixed;
}
img.img1:hover, div.img1:hover {
padding-right: 150px;
}
<img class="img1" src="https://i.pinimg.com/originals/34/b5/86/34b58689b0870284621a661a2c538652.png">
<div class="img1">
<p>Name: Eren Yeager</p>
<p>Age: 20 y.o</p>
<p>Anime: Attack On Titan</p>
<p>Height: 195cm</p>
<p>Living in: Shiganshina District</p>
</div>
In the script above, I don't want the slider to just slide without the text. I want it to slide and sliding the text with it so it'll look like this:
img.img1, div.img1 {
width: 150px;
margin: 5px 0px 5px 0px;
border: 10px solid rgb(0,0,150);
background: rgb(0,0,150);
margin-left: 0px;
transition: 0.5s;
color: #fff;
font-size: 12px;
writing-mode: vertical-rl;
text-orientation: mixed;
}
img.img1:hover {
padding-right: 150px;
}
div.img1:hover {
margin-left: 150px;
}
<img class="img1" src="https://i.pinimg.com/originals/34/b5/86/34b58689b0870284621a661a2c538652.png">
<div class="img1">
<p>Name: Eren Yeager</p>
<p>Age: 20 y.o</p>
<p>Anime: Attack On Titan</p>
<p>Height: 195cm</p>
<p>Living in: Shiganshina District</p>
</div>
In the end. What I want is:
The image information is hiding behind the image (the user can't see them).
Once the user hover over the image, the information will slide from behind the image.
Example:
img.img1, div.img1 {
display: inline-block;
width: 150px;
margin: 0px 0px 0px 0px;
border: 10px solid rgb(0,0,150);
background: rgb(0,0,150);
margin-left: 0px;
transition: 0.5s;
color: #fff;
font-size: 12px;
writing-mode: vertical-rl;
text-orientation: mixed;
}
img.img2, div.img2 {
display: inline-block;
width: 150px;
margin: 0px 0px 0px 0px;
border: 10px solid rgb(0,0,150);
background: rgb(0,0,150);
margin-left: 0px;
transition: 0.5s;
color: #fff;
font-size: 12px;
writing-mode: vertical-rl;
text-orientation: mixed;
}
<img class="img1" src="https://i.pinimg.com/originals/34/b5/86/34b58689b0870284621a661a2c538652.png">
<br>
<br>
<p>When the user hover:</p>
<br>
<br>
<img class="img2" src="https://i.pinimg.com/originals/34/b5/86/34b58689b0870284621a661a2c538652.png">
<div class="img2">
<p>Name: Eren Yeager</p>
<p>Age: 20 y.o</p>
<p>Anime: Attack On Titan</p>
<p>Height: 195cm</p>
<p>Living in: Shiganshina District</p>
</div>
If I needed to use JavaScript to do it, then it's fine I'll use it.

First, put them in a wrapper
Then by using position:absolute; on the <div class="img2"> as well as giving it top:0; right:0; will make the info div cling unto the upper-right corner of the wrapper so that whenever the wrapper extends to the right, the div.img2 will move to the right as well
Next give the img.img2 a z-index:10; to make it float/appear on top of everything else;
Finally assign the :hover to the wrapper. Add padding-left:150px; with a transition: padding .5s and your done.
[Note from Liqui Kal: If the background does not fit perfectly behind the image, then change the statement display: inline-block; to display: inline-flex;]
We can use inline-flex / inline-grid to center the image using align-items:center to vertically align the image but we can't justify it because when justified to the center, the image will move along the expansion of the parent div. - StepPen-codes
let radioBtn = document.querySelectorAll('input[type=radio]')
for (let btn of radioBtn) btn.addEventListener('change', function(event) {
document.documentElement.style.setProperty('--text-align', event.target.value)
})
:root {
--text-align: left;
}
.imgWCap {
position: relative;
display: inline-flex;
align-items: center;
background: rgb(0, 0, 150);
transition: 0.5s;
}
.imgWCap:hover {
padding-right: 140px;
background: rgb(0, 0, 150);
}
.img2 {
padding: 10px;
}
img.img2 {
position: relative;
width: 150px;
margin: 0;
z-index: 10;
}
div.img2 {
position: absolute;
right: -10px;
font-size: 12px;
color: #fff;
text-align: var(--text-align);
/*Here is the the text align at work;*/
writing-mode: vertical-rl;
}
HOVER OVER THE PICTURE <br>
<div class="imgWCap">
<img class="img2" src="https://i.pinimg.com/originals/34/b5/86/34b58689b0870284621a661a2c538652.png">
<div class="img2">
<p>Name: Eren Yeager</p>
<p>Age: 20 y.o</p>
<p>Anime: Attack On Titan</p>
<p>Height: 195cm</p>
<p>Living in: Shiganshina District</p>
</div>
</div>
<br>Pick the text-alignment that you need.
<form>
<label for=left>Left</label><input id=left name=align type=radio value=left>
<label for=center>Center</label><input id=center name=align type=radio value=center>
<label for=right>right</label><input id=right name=align type=radio value=right>
</form>

Related

Chrome's inspect device is extremely inaccurate?

I am trying to see how the page looks like on a 1366x768 laptop.
In Inspect device it looks perfectly fine:
But on the actual laptop, it looks like this:
So way off! :-/ It is very frustrating as I work on a big screen, and I cannot check it on the small laptop screen every minute.
How comes the page fits perfectly fine in the 1366x768's chrome device inspect but horribly on the actual 1366x768 screen?
Any tip what may be going on?
CSS:
/* Split the screen in half */
.split {
height: 100%;
width: 50%;
position: fixed;
z-index: 1;
top: 0;
overflow-x: hidden;
padding-top: 20px;
}
/* Control the left side */
.left {
left: 0;
}
/* Control the right side */
.right {
right: 0;
}
/* If you want the content centered horizontally and vertically */
.centered {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
}
.form {
position: relative;
z-index: 1;
background: #FFFFFF;
color:black;
max-width: 560px;
min-width: 500px;
margin: 0 auto 100px;
padding: 45px;
text-align: center;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
}
.form input {
font-family: "Roboto", sans-serif;
outline: 0;
background: #f2f2f2;
width: 100%;
border-color: #eee;
border-width: 1px;
margin: 0 0 15px;
padding: 15px;
box-sizing: border-box;
font-size: 14px;
}
.Forgot-Password {
font-family: "Roboto";
font-size: 17px;
font-weight: normal;
font-style: normal;
font-stretch: normal;
margin-top:15px;
text-align: center;
color: #555556;
}
.form button {
font-family: "Roboto", sans-serif;
outline: 0;
background:#009bf7;
width: 100%;
border: 0;
padding: 15px;
font-size: 17px;
-webkit-transition: all 0.3 ease;
transition: all 0.3 ease;
cursor: pointer;
color:white;
}
.form button:hover,.form button:active,.form button:focus {
background:#0c6ea7
}
.form button:disabled {
background: #dddddd;
}
.form .message {
margin: 15px 0 0;
color: #b3b3b3;
font-size: 12px;
}
.form .message a {
color: #4CAF50;
text-decoration: none;
}
.form .register-form {
display: none;
}
The HTML markup:
<div class="split left">
<div class="centered">
<div style="margin-bottom:60px">
<img class="img-responsive" src="images/fineon.png" alt="Fineon"> </div>
<style>
.navbar {
display: none;
}
.navbar-primary {
display: none;
}
</style>
<div ng-controller="login-controller" ng-init="initLoginPage()">
<div align="center">{{message}}</div>
<form class="login-form form">
<p class="form-login-title" dir="{{pageInfo.direction}}">{{gs("signIn", "Sign in")}}</p>
<hr style="margin-right:370px;border: 1px solid black;" width="15%">
<div class="form-field">
<input dir="{{pageInfo.direction}}" type="text" name="first_name" id="first_name" required ng-model="user.email">
<label for="first_name">{{gs("emailAddress", "Email Address")}}</label>
</div>
<div class="form-field">
<input dir="{{pageInfo.direction}}" type="text" name="first_name" id="first_name" required ng-model="user.password">
<label for="first_name">{{gs("password", "Password")}}</label>
</div>
<button ng-disabled="crisperSessionId == undefined" dir="{{pageInfo.direction}}" ng-click="login()"
type="submit">{{gs("signInButton", "Sign in")}}</button>
<p class="Forgot-Password"><a class="Forgot-Password" href="#/loginForgot">Forgot my password</a></p>
</form>
</div>
</div>
<div class="split right ">
<div class="centered">
<h4 class="Fineon-Exchange">Fineon</h4> <br>
<p class="Export-Receivable-Finance-Marketplace" >Trade Finance & Marketplace</p>
<div style="width:70px; margin-top:50px">
<hr style="border: 1px solid white;">
</div>
</div>
</div>
</div>
Although I am not a hard core programer or any expert, but I think I know what might be wrong. The Inspect Element of your browser shows your page in a 1366x768 resolution. Whereas on the laptop, you are actually viewing the page in 1366-(top and bottom toolbars pixels) x 768-(scroll bar width pixels) resolution. So, the laptop has resolution of 1366x768 but actual displayable resolution is lesser than that and, in my opinion, is the problem.
Now you can either get the actual displayable resolution from the laptop and set as custom resolution in your chrome inspect tool or press f11 on your laptop to see the page in actual 1366x768 resolution.

Control side that shortens when changing div height on hover

I'm using this hover effect for buttons, but in a few cases when the height changes, the top remains the same and the bottom moves up, instead of vice versa like it should. How can I make sure it always goes in the correct direction?
jsfiddle
.button {
box-sizing: border-box;
display: inline-block;
width: 215px;
height: 55px;
color: white;
font-family: $arial;
font-size: 12px;
font-weight: bold;
text-transform: uppercase;
text-align: center;
text-decoration: none;
text-shadow: 1px 1px 1px rgba(43, 36, 36, 0.35);
letter-spacing: .1em;
border-radius: 3px;
position: relative;
background: #009ee0;
border: 1px solid #148fc6;
border-bottom: 4px solid #148fc6;
}
.button:hover {
border-bottom: 1px;
height: 53px;
}
.button span {
position: absolute;
width: 90%;
left: 0;
right: 0;
margin: auto;
top: 50%;
transform: translateY(-43%);
line-height: 1.2;
}
div {
padding: 20px 5px;
}
<div>
<a href="#" class="button">
<span>Wrong way</span>
</a>
</div>
<div>
<a href="#" class="button">
<span>I work fine</span>
</a>
<a href="#" class="button">
<span>I work fine</span>
</a>
</div>
You're reducing the height from 55px to 53px. That 2px has to go somewhere. The top button is just collapsing it. (The bottom two are doing the same, it just doesn't look like it because they are being affected by vertical text alignment). change your hover rule to this to accommodate for the height loss.
.button:hover {
border-bottom: 1px;
margin-top: 2px;
height: 53px;
}
https://jsfiddle.net/exd6hhvz/
I was able to make it work consistently by adding margin-top: 2px; to .button:hover
Here's an example: https://jsfiddle.net/vf03czp5/

The text goes over the image and not under it

The problem is that when I added an image to my html page,and I tried to write something to continue my working,the text was going over the image.I want the text to be going under the image.I don't want to use 50 "br" tags so that I can write under it.Do you know what's the problem guys ?
.poze {
max-width: 100%;
margin-top: 0.5em;
margin-bottom: 1em;
-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 20px;
background: white;
border: 1px solid #CCC;
border-bottom-left-radius: 5px 5px;
border-bottom-right-radius: 5px 5px;
border-top-left-radius: 5px 5px;
border-top-right-radius: 5px 5px;
padding: 8px;
"
}
.cerculet {
display: block;
}
.cerculet:after {
display: block;
clear: both;
content:' ';
}
.cerculet p {
font-weight: bold;
}
.cerculet h2 {
font-size: 120%;
height: 145%;
width: 1.6em;
height: 1.6em;
text-align: center;
border-radius: 50%;
background-color: black;
color: white;
white-space: nowrap;
float: left;
margin-right: 15px;
}
That was the CSS.Now I'll post the html code:
<h2>
<div class="cerculet">
<h2>2 </h2>
<p>
<font size="5" face="Cambria">
Gripa Spaniola (1918 - 1919):<br>
A ucis intre 50 si 100 de milioane de oameni din intreaga<br>
lume in mai putin de 2 ani
</font>
</p>
</div>
</h2>
<br>
<img src="http://s6.postimg.org/6oyuxe1e9/Spanish_Flu.jpg" class="poze" style="position:absolute; left:150px;">
<div>
<h1>
As you can see,the text doesn't go under my image.How to fix this problem guys?
</h1>
</div>
I hope you'll understand the code.I mean,I used that "4 spaces indent" or whatever and I don't know if that's the right way to post the code.If I copy/paste all,it won't show it right..
https://jsfiddle.net/9hw89uog/
Remove position:absolute from your image styles, it is an inline style in your case
Here is one solution: https://jsfiddle.net/73s1c4h1/2/
<div class="clearfix">
<img src="https://images.nga.gov/images/bindo.jpg" class="poze"style="margin-left:150px;">
<div>
<h1 >
Now the text should be clear of the image and positioned below it.
</h1>
</div>
</div>
This involves using the all famous "clearfix" CSS solution. You will need to wrap the image and text in a div, then place class="clearfix" in that div. The clearfix CSS is here: https://css-tricks.com/snippets/css/clear-fix/
It will force the div element to clear the children elements.
Clearfix CSS:
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content:" ";
clear: both;
height: 0;
}
* html .clearfix { zoom: 1; } /* IE6 */
*:first-child+html .clearfix { zoom: 1; } /* IE7 */
The second solution is a bit simpler; just set position: relative; rather than absolute. https://jsfiddle.net/73s1c4h1/1/
You may also need to change left: 150px to margin-left: 150px

Position button segment right

I'm writing a CSS framework and when it comes to handling buttons I'm trying to make it so that the user can segment the button (this is done, see the fiddle below) - however, I want to add another semantic CSS selector that will allow the user to positon this left/right of the button text (automatically right). My issue is, however - I don't want to affect the HTML in any way, the HTML structure is the same for every other button, so I'd rather not altar this if possible.
I've tried floating the segment left, afterwards I thought it was pretty obvious that wouldn't work - the height of the button is also dependent on the padding of the segment - so (as far as I'm aware) it's not possible to position this absolutely. I'm having a mental block as to how to achieve this.
Here is my current CSS:
.dte.button {
border-radius: 0;
display: inline-block;
border: 0;
outline: 0;
padding: 10px;
background: #34495e;
color: white;
font-family: 'Roboto', sans-serif;
text-transform: uppercase;
cursor: pointer;
transition: 0.25s all;
position: relative;
}
button.dte.button.segmented {
padding: 0;
padding-left: 10px;
position: relative;
}
.dte.button .segment {
filter: brightness(50%);
background: rgba(0, 0, 0, 0.53);
padding: 10px;
display: inline-block;
margin-left: 10px;
}
And my HTML structure
<button class="dte button segmented">
This should align the segment RIGHT (it does)
<div class="segment">
<i class="fa fa-align-right"></i>
</div>
</button>
<button class="dte button segmented left">
This should align the segment LEFT(It doesn't)
<div class="segment">
<i class="fa fa-align-left"></i>
</div>
</button>
Fiddle of what I current have.
It is not pretty, but you can use float:left if you then fix your spacing with some negative margins.
So for example:
.dte.button {
border-radius: 0;
display: inline-block;
border: 0;
outline: 0;
padding: 10px;
background: #34495e;
color: white;
font-family: 'Roboto', sans-serif;
text-transform: uppercase;
cursor: pointer;
transition: 0.25s all;
position: relative;
}
button.dte.button.segmented {
padding: 0;
padding-left: 10px;
position: relative;
}
button.dte.button.segmented.left {
padding: 10px 10px 10px 0;
}
.dte.button .segment {
filter: brightness(50%);
background: rgba(0, 0, 0, 0.53);
padding: 10px;
display: inline-block;
margin-left: 10px;
}
.dte.button.left .segment {
float: left;
margin: -10px 10px -10px 0;
}
<div style="padding: 20px;">
<button class="dte button">dte-button</button>
<button class="dte button segmented">
Dropdown Button
<div class="segment">
ICON
</div>
</button>
<button class="dte button segmented">
Segment Aligned Right
<div class="segment">
ICON
</div>
</button>
<button class="dte button segmented left">
Segment Aligned Left
<div class="segment">
ICON
</div>
</button>
</div>
Here also a fiddle.

fix position div on top of parent so it doesn't move on resize

I know there is a lot of discussion out there on this topic, and I've read a lot and tired a number of things. This tutorial was very helpful http://alistapart.com/article/css-positioning-101 with some of my other pages. But this one is throwing me.
I'm trying to position the #mainwrapper central and on top on top of the #bubble div. I have achieved this by specifying the position with top:200px ect. But when resizing the window everything moves. I've fixed the issue on other pages by position using relative positioning. Howver when I tried that on this page it hides the #mainwrapper behind the #bubble.
Really stuck!
<div id="bubble">
<div class="content">
<div class ="nav_image">
<img src="../navbar/backbar.gif" height="114"/><br />
<nav>
<ul>
<li class='active'>Home</li>
<li class='has-sub'>Cottages
<ul>
<li class="has-sub">Farmhouse
<ul>
<li>Facilities</li>
<li>Guest Book</li>
<li>Booking Rates</li>
</ul>
</li>
<li class="has-sub">The Barn
<ul>
<li>Facilities</li>
<li>Guest Book</li>
<li>Booking Rates</li>
</ul>
</li>
<li class="has-sub">Granary
<ul>
<li>Facilities</li>
<li>Guest Book</li>
<li>Booking Rates</li>
</ul>
</li>
</ul>
</li>
<li>Croyde</li>
<li>Contact us</li>
</ul>
</nav>
</div>
</div>
</div>
<div id="mainwrapper">
<div id="box-1" class="box">
<img id="image-1" src="030.jpg"/>
<span class="caption simple-caption">
The Farmhouse
</span>
</div>
<div id="box-2" class="box">
<img id="image-2" src="040.jpg"/>
<span class="caption simple-caption">
The Barn
</span>
</div>
<div id="box-3" class="box">
<img id="image-3" src="038.jpg"/>
<span class="caption simple-caption">
The Granary
</span>
</div>
</div>
<div id="bubble2">
<div class="blurb">
<img src="../titles/the cottages (Copy).jpg" alt="The Cottages">
<p>The properties are idyllically situated right in the heart of the picturesque Devon coastal village of Croyde, which has history that stretches over a thousand years to pre-saxon times.</p>
<p>The Farmhouse & Barn are 17th century Grade II listed and both sleep 6. The Granary is Curtelage listed and sleeps 2. All of the cottages can be rented togther or seperatly as required. The Barn and Farmhouse are ideal for big parties with an interconnecting door which we can arrange to be unlocked.</p>
<p>The cottages are located centrally in the village, down a small quiet lane just 5 minutes walk to the pubs and eateries and 10 minutes walk to the beautiful sandy beach.</p>
</div>
</div>
</body>
</html>
CSS:
#charset "utf-8";
/* CSS Document */
body {
font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
background: #4E5869;
color: #000;
}
#bubble {
width: 1013px;
height: 800px;
left: 6px;
margin: 0 auto;
background-image: url('../images/sea board (Copy).jpg');
background-repeat: no-repeat;
-moz-border-radius: 10px;
-khtml-border-radius: 10px;
-webkit-border-radius: 10px;
-moz-box-shadow: 0px 0px 8px rgba(0,0,0,0.3);
-khtml-box-shadow: 0px 0px 8px rgba(0,0,0,0.3);
-webkit-box-shadow: 0px 0px 8px rgba(0,0,0,0.3);
position: relative;
z-index: 90; /* the stack order: displayed under ribbon rectangle (100) */
}
#mainwrapper {
position: relative;
top: 32px;
width: 740px;
background: transparant;
padding: 20px 50px 20px 50px;
min-height: 250px;
height: auto;
}
#mainwrapper .box {
position: relative;
border: 3px solid white;
cursor: pointer;
height: 225px;
float: left;
overflow: hidden;
width: 225px;
-webkit-box-shadow: 1px 1px 1px 1px #ccc;
-moz-box-shadow: 1px 1px 1px 1px #ccc;
box-shadow: 1px 1px 1px 1px #ccc;
}
#bubble2{
position: relative;
width: 980px;
height: 300px;
margin: 0 auto;
background:white;
-moz-border-radius: 10px;
-khtml-border-radius: 10px;
-webkit-border-radius: 10px;
-moz-box-shadow: 0px 0px 8px rgba(0,0,0,0.3);
-khtml-box-shadow: 0px 0px 8px rgba(0,0,0,0.3);
-webkit-box-shadow: 0px 0px 8px rgba(0,0,0,0.3);
z-index: 90; /* the stack order: displayed under ribbon rectangle (100) */
}
#mainwrapper .box img {
position: relative;
left: 0;
-webkit-transition: all 300ms ease-out;
-moz-transition: all 300ms ease-out;
-o-transition: all 300ms ease-out;
-ms-transition: all 300ms ease-out;
transition: all 300ms ease-out;
}
#mainwrapper .box .caption {
background-color: rgba(0,0,0,0.8);
position: absolute;
color: #fff;
z-index: 100;
-webkit-transition: all 300ms ease-out;
-moz-transition: all 300ms ease-out;
-o-transition: all 300ms ease-out;
-ms-transition: all 300ms ease-out;
transition: all 300ms ease-out;
left: 0;
}
#mainwrapper .box .simple-caption {
height: 70px;
width: 225px;
display: block;
bottom: -80px;
line-height: 15pt;
text-align: center;
}
#mainwrapper .box:hover .simple-caption {
-moz-transform: translateY(-100%);
-o-transform: translateY(-100%);
-webkit-transform: translateY(-100%);
transform: translateY(-100%);
}
#mainwrapper .span {
text-decoration: none;
color: white;
font-weight: bold;
}
h1{
font-size: 100%;
font-weight: bold;
padding-right: 15px;
padding-left: 15px;
}
h2, h3, h4, h5, h6, p {
margin-top: 0; /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
padding-right: 15px;
padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
}
a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
border: none;
}
/* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
a:link {
color: #33CCFF;
text-decoration: none;
font-size: medium;
font-weight: normal;
}
a:visited {
color: #0033CC;
text-decoration: underline;
}
a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
text-decoration: none;
}
.content {
padding: 10px 0;
}
/* ~~ This grouped selector gives the lists in the .content area space ~~ */
.content ul, .content ol {
padding: 0 15px 15px 40px; /* this padding mirrors the right padding in the headings and paragraph rule above. Padding was placed on the bottom for space between other elements on the lists and on the left to create the indention. These may be adjusted as you wish. */
}
/* ~~ miscellaneous float/clear classes ~~ */
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
float: left;
margin-right: 8px;
}
.clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the overflow:hidden on the .container is removed */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
Any help would be hreat!
Thanks
Does adding margin:0 auto; like this?
#mainwrapper {
position: relative;
top: 32px;
width: 740px;
background: transparant;
padding: 20px 50px 20px 50px;
min-height: 250px;
height: auto;
margin:0 auto;
}
Does that resolve you're issue? if you're having problems with absolutes falling behind other objects z-index can often be very helpful.
Pen of the above solution here
http://codepen.io/dave_agilepixel/pen/bgjlv