Keeping placeholder visible when typing - html

I am using React and try to build a website which allows you to analyze your twitter bubble. So, I have a form in which you can search for a twitter username. Thus, I put an "#" as a placeholder into this form, which disappears when you start typing. My goal is that the "#" stays when you start typing, so e.g. I could type "potus44" and it displays "#potus44" in this form (i hope this makes sense). So in the end, the "#" would not disappear but stay in front of the twitter handle.
See screenshot of my current form: Screenshot
This is the code for my form.
import React, { Component } from 'react';
import { FiTwitter } from "react-icons/fi";
const app = {
options: []
};
const onFormSubmit = (e) => {
e.preventDefault();
const option = e.target.elements.option.value;
if (option) {
app.options.push(option);
e.target.elements.option.value = '';
}
}
class Homepage extends Component {
render () {
return (
<div className="homepage">
<div className="container-pagecontent">
<main style={{marginTop: '150px'}}>
<h1 id="home" >Analyse your bubble! <FiTwitter size=".8em" /></h1>
<p>Search for your bubble.</p>
<form onSubmit={onFormSubmit}>
<input placeholder="#" className ="input" type="text" name="option"/>
<button className="button">Suchen</button>
</form>
</main>
</div>
</div>
)
}
}
export default Homepage
And this is my scss (in case it might be useful for you).
.button {
background-color: #1763A5;
font-family: bergen;
color: white;
border: 2px solid #1763A5;
padding: 6px;
font-size: 18px;
border-radius: 6px;
margin-left: 10px;
transition-duration: 0.4s;
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
outline: none;
}
.button:hover {
background-color: white;
color: #1763A5;
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
}
.input {
width: 150px;
}
input[type=text] {
width: 170px;
padding: 7px 10px;
margin: 12px 0;
margin-right: 2px;
box-sizing: border-box;
border: 2px solid #1763A5;
border-radius: 6px;
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
outline: none;
}
and the code for the "container-pagecontent":
.container-pagecontent {
max-width: 95rem;
margin: 0 auto;
padding: 0 $m-size;
width: 100%;
text-align: center;
}
Thanks in advance for your help. Let me know if you need more insights into the project.

okay.
In styles.scss::
.homepage {
h1::before {
display: block;
content: " ";
margin-top: -150px;
height: 130px;
visibility: hidden;
pointer-events: none;
}
height: 110vh;
background-color: white;
padding-left: 40px;
padding-right: 40px;
}
#font-face {
src: url(/fonts/BergenText-Regular.otf);
font-family: bergen;
}
.button {
background-color: #1763A5;
font-family: bergen;
color: white;
border: 2px solid #1763A5;
padding: 6px;
font-size: 18px;
border-radius: 6px;
margin-left: 10px;
transition-duration: 0.4s;
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
outline: none;
}
.button:hover {
background-color: white;
color: #1763A5;
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
}
.placeholder{
position: relative;
}
.placeholder::after{
content: attr(data-placeholder);
position: absolute;
left:0.325rem;
top:33%;
}
input[type=text] {
width: 170px;
padding: 7px 0 7px 20px;
margin: 12px 0;
margin-right: 2px;
box-sizing: border-box;
border: 2px solid #1763A5;
border-radius: 6px;
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
outline: none;
}
In App.js::
import React, { Component } from "react";
import "./styles.scss";
const app = {
options: []
};
const onFormSubmit = (e) => {
e.preventDefault();
const option = e.target.elements.option.value;
if (option) {
app.options.push(option);
e.target.elements.option.value = "";
}
};
class Homepage extends Component {
render() {
return (
<div className="homepage">
<div className="container-pagecontent">
<main style={{ marginTop: "150px" }}>
<h1 id="home">Analyse your bubble!</h1>
<p>Search for your bubble.</p>
<form onSubmit={onFormSubmit}>
<div className="placeholder" data-placeholder="#">
<input
className="input"
type="text"
name="option"
/>
</div>
<button className="button">Suchen</button>
</form>
</main>
</div>
</div>
);
}
}
export default Homepage;

Related

Styling a button with hover effect

I'm having some issues with my code.
I added this button to my HTML page and CSS with the styling of the button class and the hover effect:
.buton4e {
background-color: #383f95;
border: none;
border-radius: 8px;
color: white;
padding: 7px 16px;
text-align: center;
text-decoration: none;
display: inline-block;
font-weight: bold;
cursor: pointer;
font-size: 16px;
}
.buton4e:hover {
background-color: #383f95;
border: none;
border-radius: 8px;
color: white;
padding: 7px 16px;
text-align: center;
text-decoration: none;
display: inline-block;
font-weight: bold;
font-size: 16px;
box-shadow: 0 12px 16px 0 rgba(0, 0, 0, 0.24), 0 17px 40px 0 rgba(0, 0, 0, 0.19);
}
.intro-header {
padding-top: 40px;
padding-bottom: 40px;
text-align: center;
color: #f8f8f8;
background: url(../img/background.jpg) no-repeat center center;
background-size: cover;
}
.intro-message {
position: relative;
padding-top: 20%;
padding-bottom: 20%;
}
.intro-message>h1 {
margin: 0;
text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
font-size: 5em;
}
.intro-divider {
width: 400px;
border-top: 1px solid #f8f8f8;
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
.intro-message>h3 {
text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
}
<!-- Header -->
<header class="intro-header">
<div class="container">
<div class="intro-message">
<br /><br /><br />
<h3>90% of IT companies believe they need to partner to grow.<br /> Join <b>Channeliser</b> - the global network for building IT partnerships.</h3>
<hr class="intro-divider">
<button class="buton4e">JOIN FOR FREE</button>
</div>
</div>
</header>
The problem is that the effect works when I hover the button but there when the button is static it has no styling
*EDIT:
Sorry for not posting all the code.
This should be sufficient for the things I'm trying to modify.
Thanks in advance.
.styledButton {
font-family: Arial;
width: 100px;
height: 50px;
color: black;
background-color: grey;
border: 0;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
}
.styledButton:hover {
color: white;
background-color: black;
}
.styledButton:active {
opacity: 0.5;
}
<button class = "styledButton">Click Me!</button>
This should help. Any click animations I have trouble with.

What is wrong this code?

Im an HTML newbie & I can't seem to figure out the problem with the code I've just written. Of course the XXXX's don't count ;-)
I'm certain that the style of this code gets me the result that I want, however the strange thing is thing is that when I run this code on my site or on scratchpad.io (the site that I use to test out code before implementing it)
<form action="XXXX" method="post">
<input type="hidden" name="FORM_ID" value="XXXX">
<input type="hidden" name="COMPLETE_URL" value=“XXXX”>
.body {
padding: 20px;
}
* {
font-family: Arial, sans-serif;
font-size: 15pt;
margin: 0;
padding: 0;
border: none;
}
.send {
background: #62b4f5;
color: #fff;
font-weight: 500;
border-radius: 0 4px 4px 0;
padding: 10px 30px;
font-size: 13pt;
box-shadow: 0px 2px 5px 0px rgba(173,173,173,0.5);
margin-left: -6px;
}
.send:hover {
font-weight: 700;
padding: 10px 29px;
}
input[type="text"] {
width: 300px;
border-radius: 4px 0 0 4px;
padding: 10px 20px;
box-shadow: 0px 2px 5px 0px rgba(173,173,173,0.5);
outline: none;
}
.suggestion {
padding: 5px 15px;
}
.suggestion:hover {
cursor: pointer;
background: rgba(0, 0, 0, 0.15);
}
#autosuggest {
position: absolute;
top: 70px;
background: rgba(0,0,0,0.05);
width: 400px;
}
</style>
</form>
There is no opening tag <style> found.

angular2: style md-dialog

i am trying to style md-dialog to be as in image1
Image 1
image 1 css class :
.mat-dialog-container {
box-shadow: 0 11px 15px -7px rgba(0,0,0,.2), 0 24px 38px 3px rgba(0,0,0,.14), 0 9px 46px 8px rgba(0,0,0,.12);
display: block;
padding: 24px;
border-radius: 2px;
box-sizing: border-box;
overflow: hidden;
background: white;
width: 500px;
height: 162px;
}
but the browser overrides my style i always find that the browser apply this css class to the component and override my style
.mat-dialog-container {
box-shadow: 0 11px 15px -7px rgba(0,0,0,.2), 0 24px 38px 3px rgba(0,0,0,.14), 0 9px 46px 8px rgba(0,0,0,.12);
display: block;
padding: 24px;
border-radius: 2px;
box-sizing: border-box;
overflow: auto;
max-width: 80vw;
width: 100%;
height: 100%;
}
so the dialog be like image 2 :
Image 2
i added my style to the css file as mat-dialog-container and also i named it as host like this
host:{
box-shadow: 0 11px 15px -7px rgba(0,0,0,.2), 0 24px 38px 3px rgba(0,0,0,.14), 0 9px 46px 8px rgba(0,0,0,.12);
display: block;
padding: 24px;
border-radius: 2px;
box-sizing: border-box;
overflow: hidden;
background: white;
width: 500px;
height: 162px;
}
but it is always get overridden
the name of my dialog is discard-pop-up and the code is as following :
discard-pop-up.component.html :
<h1 md-dialog-title>Discard Changes</h1>
<div md-dialog-content>Are you sure you want to discard changes ?</div>
<div md-dialog-actions>
<button md-button (click)="dialogRef.close('Option 1')">Yes</button>
<button md-button (click)="dialogRef.close('Option 2')">No</button>
</div>
discard-pop-up.component.ts :
import { Component, OnInit } from '#angular/core';
import {MdDialog, MdDialogRef} from '#angular/material';
#Component({
selector: 'app-discard-pop-up',
templateUrl: './discard-pop-up.component.html',
styleUrls: ['./discard-pop-up.component.css']
})
export class DiscardPopUpComponent implements OnInit {
popUpContent:string;
popUpTitle:string;
constructor(public dialogRef: MdDialogRef<DiscardPopUpComponent>) {}
ngOnInit() {
}
}
discard-pop-up.component.css :
.mat-dialog-container {
box-shadow: 0 11px 15px -7px rgba(0,0,0,.2), 0 24px 38px 3px rgba(0,0,0,.14), 0 9px 46px 8px rgba(0,0,0,.12);
display: block;
padding: 24px;
border-radius: 2px;
box-sizing: border-box;
overflow: hidden;
background: white;
width: 500px;
height: 162px;
}
and i am oppining it inside another component by calling this function :
openDialog() {
let dialogRef = this.dialog.open(DiscardPopUpComponent, {
// padding: '24px',
// border-radius: '2px',
// box-sizing: 'border-box',
// overflow: 'hidden',
// width: '542px',
// height: '160px',
// background: 'white',
});
dialogRef.afterClosed().subscribe(result => {
this.selectedPopUpOption = result;
});
}
}

How can I center my form? - HTML and CSS

I have a site here: http://americanbitcoinacademy.com/user-login/
As you can see the form is not yet centered.
The "username", "password", "remember me" are centered which must be text-aligned left.
I want to center the form and then text align left the username, password and the remember me label..using inspect element tool how can I do that?
Here's my CSS:
#import url(https://fonts.googleapis.com/css?family=Roboto:300);
.login-page {
width: 360px;
padding: 8% 0 0;
margin: auto;
}
.form {
position: relative;
z-index: 1;
background: #FFFFFF;
max-width: 360px;
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: 0;
margin: 0 0 15px;
padding: 15px;
box-sizing: border-box;
font-size: 14px;
}
.form button {
font-family: "Roboto", sans-serif;
text-transform: uppercase;
outline: 0;
background: #dd374d;
width: 100%;
border: 0;
padding: 15px;
color: #FFFFFF;
font-size: 14px;
-webkit-transition: all 0.3 ease;
transition: all 0.3 ease;
cursor: pointer;
}
.form button:hover,.form button:active,.form button:focus {
background: #43A047;
}
.form .message {
margin: 15px 0 0;
color: #b3b3b3;
font-size: 12px;
}
.form .message a {
color: #4CAF50;
text-decoration: none;
}
.form .register-form {
display: none;
}
body {
background: #ecf0f1; /* fallback for old browsers */
font-family: "Roboto", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.page-heading{ display: none; }
Please help!
You can remove
text-align: center;
from your form element.
for text left in labels..
.form label{width:100%;text-align:left;}
And if you change the <div id="content" class="col-md-9" role="main"> to <div id="content" class="col-md-12" role="main"> the form will be centered.
Cheers!
remove text-align:center form .form class
.form {
position: relative;
z-index: 1;
background: #FFFFFF;
max-width: 360px;
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);
}
and also remove col-md-9 class form the div having content as ID
<div id="content" class="col-md-9" role="main">
Remove text-align: center; from this class -
.form {
position: relative;
z-index: 1;
background: #FFFFFF;
max-width: 360px;
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);
}
And add this CSS to the remember me checkbox width: auto;
Avoid using element level CSS specificity such as: .form input always use classes.
Read more on CSS specificity:
MDN: https://developer.mozilla.org/en/docs/Web/CSS/Specificity
And a specificity calculator: https://specificity.keegan.st/
Remove the text-align:center from class form and change the class ub div from col-md-9 to col-md-12
<div id="content" role="main" class="col-md-12">
....
</div>
Your Updated CSS would be
.form {
position: relative;
z-index: 1;
/* text-align:center; Remove this line */
background: #FFFFFF;
max-width: 360px;
margin: 0 auto 100px;
padding: 45px;
text-align: left;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
}
Change no. 1-
<div id="content" class="col-md-9" role="main"></div> to
<div id="content" class="col-md-12" role="main"></div>
Change no. 2-
.form {
position: relative;
z-index: 1;
background: #FFFFFF;
max-width: 360px;
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);
} to
.form {
position: relative;
z-index: 1;
background: #FFFFFF;
max-width: 360px;
margin: 0 auto 100px;
padding: 45px;
text-align: left;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
}
Change no. 3- Add the following Css-
.login-remember label{ width: 100%;}
.form .login-remember input{width: auto;}
In fact the form itself is centered inside its container <article class="single-page-content">. You simply need to give that article, or actually its parent element (i.e. the div with id=content) full width.
For left alignment inside the form just change text-align: center to left inside the CSS rule for .form
.login-page {
width: 360px;
padding: 8% 0 0;
margin: auto;
}
.form {
position: relative;
z-index: 1;
background: #FFFFFF;
max-width: 360px;
margin: 0 auto 100px;
padding: 45px;
text-align: left;
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: 0;
margin: 0 0 15px;
padding: 15px;
box-sizing: border-box;
font-size: 14px;
}
.form button {
font-family: "Roboto", sans-serif;
text-transform: uppercase;
outline: 0;
background: #dd374d;
width: 100%;
border: 0;
padding: 15px;
color: #FFFFFF;
font-size: 14px;
-webkit-transition: all 0.3 ease;
transition: all 0.3 ease;
cursor: pointer;
}
.form button:hover,.form button:active,.form button:focus {
background: #43A047;
}
.form .message {
margin: 15px 0 0;
color: #b3b3b3;
font-size: 12px;
}
.form .message a {
color: #4CAF50;
text-decoration: none;
}
.form .register-form {
display: none;
}
body {
background: #ecf0f1; /* fallback for old browsers */
font-family: "Roboto", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.page-heading{ display: none; }
<div id="body" >
<div class="container">
<div class="content-pad-3x">
<div class="row">
<div id="content" class="col-md-9" role="main">
<article class="single-page-content">
<div class="login-page">
<div class="form">
<form class="login-form">
<form name="loginform" id="loginform" action="http://americanbitcoinacademy.com/wp-login.php" method="post">
<p class="login-username">
<label for="user_login">Username:</label>
<input type="text" name="log" id="user_login" class="input" value="" size="20" />
</p>
<p class="login-password">
<label for="user_pass">Password:</label>
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" />
</p>
<p class="login-remember"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" /> Remember Me</label></p>
<p class="login-submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary" value="Log In" />
<input type="hidden" name="redirect_to" value="" />
</p>
</form><br />
Click here to become a full member…<br />
<br />
</form>
</div>
</div>

How to fix div hover to display correctly without missing sides?

I have div that have box-shadow on it and have also div:hover box-shadow.
When i check results at JSfiddle its all fine.
But when i check the results at my site i get the box-shadow right side removed:
Here is the Live code: JSfiddle
And here is the Code:
.nitz {
font-family: sans-serif;
font-size: 0;
width: 300px;
height: 76px;
direction: rtl;
background-color: #e4e5e8;
border-radius: 5px;
display: block;
box-shadow: inset rgba(255, 255, 255, 0.75) 0px 0px 0px 1000px,
inset rgba(255, 255, 255, 0.6) 0px 1px 0px,
inset rgba(255, 255, 255, 0.4) 0px 0px 0px 1px,
rgba(0, 0, 0, 0.2) 0px 1px 3px;
}
.nitz:hover {
-webkit-box-shadow: 0px 0px 5px 6px rgba(251, 219, 90, 1);
-moz-box-shadow: 0px 0px 5px 6px rgba(251, 219, 90, 1);
box-shadow: 0px 0px 5px 6px rgba(251, 219, 90, 1);
background-color: #f8f8f9;
box-sizing: border-box;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.boxtitle1 {
font-weight: bold;
text-align: right;
font-size: 14px;
padding-bottom: 3px;
}
.boxtitle2 {
text-align: right;
font-size: 14px;
}
.Cellbox2 {
display: inline-block;
margin-right: 15px;
margin-bottom: 15px;
vertical-align: top;
margin-top: 20px;
}
<a href="https://www.google.com" rel="">
<div class="nitz">
<div class="Cellbox2">
<div class="boxtitle1">That is a big test</div>
<div class="boxtitle2">That is a small one</div>
</div>
</div>
</a>
The over Divs are:
ipsWidget ipsWidget_vertical ipsBox
ipsWidget ipsWidget_vertical ipsBox
and
ipsList_reset
above all that divs.
The css of that divs are:
/* Blocks - styles for various widgets */
.ipsWidget {
position: relative;
padding: 0;
background: #fff;
}
.ipsWidget.ipsWidget_vertical {
margin-top: 15px;
}
.ipsWidget.ipsWidget_vertical .ipsWidget_title {
padding: 10px;
margin: 0;
font-size: 14px;
font-weight: 400;
position: relative;
color: #fff;
background: {theme="widget_title_bar"};
border-radius: 2px 2px 0px 0px;
}
.ipsWidget_inner{
padding: 10px;
}
.ipsWidget.ipsWidget_vertical .ipsWidget_inner {
color: #575757;
}
.ipsWidget.ipsWidget_horizontal {
padding: 0 0 10px 0;
}
.ipsWidget.ipsWidget_horizontal:not( .ipsWidgetHide ) + .ipsWidget {
margin-top: 10px;
}
.ipsWidget.ipsWidget_horizontal .ipsWidget_title {
font-weight: 400;
margin-bottom: 10px;
background: #f5f5f5;
padding: 10px;
}
.ipsWidget.ipsWidget_vertical .ipsWidget_inner {
color: #575757;
}
.ipsWidget.ipsWidget_horizontal .ipsTabs {
margin: -5px 0 5px 0;
}
.ipsWidget.ipsWidget_horizontal .ipsTabs_panel {
background: #fff;
margin: 0;
}
.ipsWidget_columns > [class*="ipsGrid"] {
margin-bottom: 0;
border-bottom: 0;
}
html[dir="ltr"] .ipsWidget_columns > [class*="ipsGrid"] {
border-right: 1px solid rgba(0,0,0,0.1);
padding-right: 10px;
}
html[dir="rtl"] .ipsWidget_columns > [class*="ipsGrid"] {
border-left: 1px solid rgba(0,0,0,0.1);
padding-left: 10px;
}
html[dir="ltr"] .ipsWidget_columns > [class*="ipsGrid"]:last-child {
border-right: 0;
}
html[dir="rtl"] .ipsWidget_columns > [class*="ipsGrid"]:last-child {
border-left: 0;
}
.ipsWidget_horizontal .ipsWidget_statsCount {
font-size: 22px;
line-height: 32px !important;
font-weight: 300;
}
.ipsWidget_horizontal .ipsWidget_stats {
margin-top: 15px;
}
.ipsWidget .ipsTabs_small {
padding: 0;
background: transparent;
}
.ipsWidget .ipsTabs_small .ipsTabs_item:not( .ipsTabs_activeItem ) {
color: rgba(50,50,50,0.6);
border-bottom: 1px solid transparent;
}
.ipsWidget .ipsTabs_small .ipsTabs_activeItem {
border-bottom: 1px solid rgba(0,0,0,0.25);
}
.ipsWidget .ipsDataItem_title {
font-size: 13px;
}
.ipsWidget.ipsWidget_primary {
background: #262e33;
}
.ipsWidget.ipsWidget_primary h3 {
color: #fff;
}
html[dir="ltr"] .ipsWidget_latestItem {
margin-left: 85px;
}
html[dir="rtl"] .ipsWidget_latestItem {
margin-right: 85px;
}
.ipsWidgetBlank {
margin-top: 16px;
padding-top: 30px;
}
I'm pretty sure the problem does not come from the code you linked.
Rather i guess that your button is on the border of a overflow : hidden div and the shadow falls outshide that div.
Or there is another invisible div beside the button hidding the shadow.
Look at that snippet and notice why part of the shadow doesn't show : The button is on the top right corner of the parent (".test") div.
I cannot check your code but i guess the problem comes from a parent div (maybe because you haven't fixed a width and it is stopping right after the button)
.test {
display: block
width: 400px;
height: 200px;
overflow: hidden;
}
.nitz {
font-family:sans-serif;
font-size: 0;
float: right;
width:300px;
height:76px;
direction:rtl; background-color:#e4e5e8;border-radius: 5px;
display:block;
box-shadow: inset rgba(255,255,255,0.75) 0px 0px 0px 1000px,
inset rgba(255,255,255,0.6) 0px 1px 0px,
inset rgba(255,255,255,0.4) 0px 0px 0px 1px, rgba(0,0,0,0.2) 0px 1px 3px;
}
.nitz:hover {-webkit-box-shadow: 0px 0px 5px 6px rgba(251,219,90,1);
-moz-box-shadow: 0px 0px 5px 6px rgba(251,219,90,1);
box-shadow: 0px 0px 5px 6px rgba(251,219,90,1);
background-color:#f8f8f9;
box-sizing: border-box;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.boxtitle1 {font-weight: bold;text-align:right; font-size:14px; padding-bottom:3px;}
.boxtitle2 {text-align:right; font-size:14px;}
.Cellbox1
{width:50px; height:50px; display:inline-block; margin-bottom:15px; margin-right:15px; margin-top:15px; }
.Cellbox2
{display:inline-block; margin-right:15px; margin-bottom:15px; vertical-align:top; margin-top:20px;}
<div class="test">
<a href="https://www.google.com" rel="">
<div class="nitz">
<div class="Cellbox2">
<div class="boxtitle1">That is a big test</div>
<div class="boxtitle2">That is a small one</div>
</div>
</div>
</a>
</div>
You can add some padding to the parent "anchor" tag with some classname
.some-class-name {
padding: 0 15px;
display: inline-block;
box-sizing: border-box;
}