Dynamic gallery with flex-box - angularjs

In the following image which is my implementation, I have two sets of photos, the first group is uploading ones, and the second groups are the uploaded ones.
In reality, right after the last uploading image, the second group should start.
I started style with available photos, later adding uploading images stamp was added, and codes are becoming spaghetti.
I looking for a way to make the asked scenario. Any idea?
My simplified HTML codes is (beside the html comments, I put some comments with ** here for explanation)
<div class="gallery-wrapper">
<ng-container *ngFor="let file of progressFiles; let i = index;">
<div class="frame">
<div class="photo-wrapper">
<img [src]="sanitizer.bypassSecurityTrustResourceUrl(file.src)" alt="dragged images" width="150" height="150">
</div>
<div class="waiting-frame">
<div *ngIf="heading === 'VIDEO'" class="loader">Loading...</div>
<div *ngIf="heading === 'PHOTO'" class="loader">Loading...</div>
</div>
</div>
</ng-container>
<!-- this part read medias -->
<div *ngIf="mediaContent && mediaContent.length">
<!-- draged and dropped medias -->
<div dnd-sortable-container [sortableData]="mediaContent">
<ng-container *ngFor="let media of mediaContent ; let i = index">
<div dnd-sortable [sortableIndex]="i" class="frame" (click)="openModal(i, mediaEdit)">
<div class="photo-wrapper">
<img *ngIf="media.thumbnail" src="{{media.thumbnail}}" alt="dragged images">
</div>
<div class="modifiers hidden-sm hidden-xs">
<div [ngClass]="{'icon vg-icon-play_arrow': heading == 'VIDEO'}"></div>
<div class="sprite sprite-rotate adjust2" tooltip="{{ 'ROTATE' | translate }}" placement="top" tooltipAnimation="true"></div>
<div class="sprite sprite-editor adjust" tooltip="{{ 'EDIT' | translate }}" placement="top" tooltipAnimation="true"></div>
<div class="sprite sprite-garbage-bin-black" tooltip="{{ 'DELETE' | translate }}" placement="top" tooltipAnimation="true" (click)="deleteMedia($event, i)"></div>
<div class="sprite sprite-exclamation adjust3" tooltip="{{ 'MISSING_DESCRIPTION' | translate }}" placement="top" tooltipAnimation="true" *ngIf="!media.description.fr && !media.description.en" (click)="stopPropagation($event)"></div>
</div>
<div class="modifiers visible-sm-inline-block visible-xs-inline-block">
<div [ngClass]="{'icon vg-icon-play_arrow': heading == 'VIDEO'}"></div>
<div class="sprite sprite-rotate adjust2"></div>
<div class="sprite sprite-editor adjust"></div>
<div class="sprite sprite-garbage-bin-black"
(click)="deleteMedia($event, i)"></div>
<div class="sprite sprite-exclamation adjust3" tooltip="{{ 'MISSING_DESCRIPTION' | translate }}" placement="top" tooltipAnimation="true"
*ngIf="!media.description.fr && !media.description.en" (click)="stopPropagation($event)"></div>
</div>
</div>
</ng-container>
</div>
</div>
</div>
And here is my SASS codes using flex-box technique.
.gallery-wrapper {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
flex-direction: row;
margin-left: -5px;
margin-right: -5px;
.frame {
margin: 10px;
border-radius: 6px;
border: 1px solid $gray;
max-width: 152px;
height: 194px;
overflow: hidden;
position: relative;
cursor: move !important;
display: inline-block;
.photo-wrapper {
width: 100%;
height: 150px;
overflow: hidden;
border-bottom: 1px solid $gray;
display: flex;
align-items: center;
background-color: $gray-light;
img {
display: inline-block;
width: 100%;
height: auto;
max-height: 150px;
pointer-events: none;
}
}
.modifiers {
display: inline-block;
position: relative;
padding: 8px 20px;
}
.waiting-frame {
display: inline-block;
text-align: center;
position: absolute;
background-color: $gray-base;
opacity: 0.6;
bottom: 0;
left: 0;
right: 0;
width: 150px;
height: 194px;
border-radius: 6px;
.loader,
.loader:after {
border-radius: 50%;
width: 10em;
height: 10em;
}
.loader {
margin: 50px auto;
font-size: 10px;
position: relative;
text-indent: -9999em;
border-top: 1.1em solid rgba(255, 247, 0, 0.2);
border-right: 1.1em solid rgba(255, 247, 0, 0.2);
border-bottom: 1.1em solid rgba(255, 247, 0, 0.2);
border-left: 1.1em solid $brand-primary;
-webkit-transform: translateZ(0);
-ms-transform: translateZ(0);
transform: translateZ(0);
-webkit-animation: load8 1.1s infinite linear;
animation: load8 1.1s infinite linear;
}
#-webkit-keyframes load8 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
#keyframes load8 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
}
}
}

Related

Viewport issues

been struggling for some time now.
I'm trying to give my welcome-section the same size as the viewport, but I just can't seem to get it done, whatever I do...
Then also, the bottom is hidden under the safari menu when I check the mobile version. I used the same formula as I used before on another project, but it doesn't work here.
Can somebody clarify, please?
Many thanks in advance!
body {
background: linear-gradient(to top right, grey, black);
height: 100%;
}
#navbar {
position: fixed;
width: 100%;
display: block-inline;
top: 0;
left: 0;
background: #db0b15;
}
.navbar {
text-align: right;
margin-right: 10px;
}
.navbar-item {
display: inline;
padding-left: 30px;
color: white;
font-size: 20px;
text-decoration: none;
text-align: center;
}
welcome-section {
height: 100%;
width: 100%;
}
a {
color: white;
text-decoration: ;
text-align: center;
}
h1 {
padding-top: 150px;
text-align: center;
color: white;
}
p {
color: white;
text-align: center;
}
.subheader {
font-size: 30px;
text-decoration: underline;
padding-top: 50px;
padding-bottom: 20px;
}
.project-list {
text-align: center;
display: grid;
grid-template-columns: 200px 200px;
grid-template-rows: 150px 150px;
grid-column-gap: 70px;
grid-row-gap: 50px;
justify-content: center;
align-content: center;
}
.project-img {
height: 120%;
width: 120%;
}
.icon {
padding-right: 20px;
padding-left: 20px;
}
.profile-link: {
color: blue;
}
#welcome-section {
height: 100vh;
}
#media only screen and (max-width: 600px) {
.project-img {
max-width: 100%;
max-height: 100%;
}
.project-list {
text-align: center;
display: grid;
grid-template-columns: 160px 160px;
grid-template-rows: 120px 120px;
grid-column-gap: 5px;
grid-row-gap: 5px;
justify-content: center;
align-content: center;
margin-right: 10px;
}
#media screen and (max-width: 768px) {
_::-webkit-full-page-media,
_:future,
:root .safari_only {
padding-bottom: 170px; //resize
}
}
}
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://kit.fontawesome.com/1c24d3937a.js" crossorigin="anonymous"></script>
<title id="title">Personal Portfolio - Iwan Van den Broeck</title>
</head>
<body id="body">
<navbar id="navbar">
<ul class="navbar">
<li class="navbar-item">Welcome</li>
<li class="navbar-item">Projects</li>
<li class="navbar-item">Contact</li>
</ul>
</navbar>
<welcome-section id="welcome-section" class="welcome-section">
<h1>Welcome to my Portfolio.<br><br>I am Iwan<br><br> and I'm a Web Developer<br><br></h1>
</welcome-section>
<projects-section id="projects">
<p class="subheader">These are some of my projects:</p>
<project-list class="project-list">
<a id="tribute-page" class="project-tile center" href="https://codepen.io/iwan-van-den-broeck/full/YzZoXvY" target="blank" alt="link to Steve Jobs tribute page"><img src="https://drive.google.com/thumbnail?id=1pTGPtU4oKYReRbMnAPkeC1ll-Nor0dSo" alt="screenshot of tribute page" class="project-img"></a>
<a id="survey-form" class="project-tile center" href="https://codepen.io/iwan-van-den-broeck/full/mdWZNPd" target="blank" alt="link to AirAsia customer satisfaction survey"><img src="https://drive.google.com/thumbnail?id=1Sclylussw2JNXSSlD3qs7xABHVKx_0LV" alt="screenshot of survey form" class="project-img"></a>
<a id="product-landing-page" class="project-tile center" href="https://codepen.io/iwan-van-den-broeck/full/NWjKdre" target="blank" alt="link to Apple landing page"><img src="https://drive.google.com/thumbnail?id=1RY4MuLY8knZk6pogcMwApjJ-fYOtTUCu" alt="screenshot of landing page" class="project-img"></a>
<a id="technical-documentation-page" class="project-tile center" href="https://codepen.io/iwan-van-den-broeck/full/BaRaRWp" target="blank" alt="link to JS technical documentation page"><img src="https://drive.google.com/thumbnail?id=1Pxp17-rmWZqD0or3lmF2UvtPbKuCyC6l" alt="screenshot of technical documentation page" class="project-img"></a>
</project-list>
</projects-section>
<contact-section id="contact">
<p class="subheader">Contact me:</p>
<p>Let's do some projects together! Contact me for more information.</p>
<p id="contact-links">
<p>
<i class="fas fa-phone-square-alt icon"> Call me</i>
<i class="fas fa-envelope-square icon"> Email me</i>
<i class="fab fa-linkedin icon"> Linkedin</i>
</p>
<p>Click here to visit my Profile
</p>
</contact-section>
</body>
</html>
You could set your section to height: 100vh; to make it the full height of your viewport.
In combination with display: block; it will work.
welcome-section {
height: 100vh;
width: 100%;
display: block;
}

Angular can not find the injector modulerr error

here is my code:
I Have no idea where the error should be. i just received this error.
Uncaught Error: [$injector:modulerr]
http://errors.angularjs.org/1.5.0/$injector/modulerr?p0=studentfeedback&p1=….c%20(https%3A%2F%2Fcode.angularjs.org%2F1.5.0%2Fangular.min.js%3A20%3A449)
I delete everything I added that day but i didn't change anything.
only if i fully cleared my html and angular the error is gone :p. so I have no clue where to find the error. I hope somebody can help me. thanks
(function(){
var app = angular.module('studentfeedback', ['ngAnimate']);
app.factory('Global', function(){
var user = {};
user.loggedin = false;
user.achternaam;
user.voornaam;
user.vakken = [];
user.periodecodes = [];
return user;
})
/*
app.service('sharedProperties', function () {
var loggedin = false;
return {
getloggedin: function () {
return loggedin;
},
setloggedin: function(value) {
loggedin = value;
}
};
});
*/
app.controller('LoginController', [ '$http', '$scope','$timeout', 'Global', function($http, $scope , $timeout, Global ){
this.panelToggle = true; //true= login / false = register
this.loggedin = Global.loggedin;
//console.log("user:0110495-12, pass:LV ");
this.checklogin = function(){
var logincontroller = this;
//studentid 0110495-12 initials LV
$http.jsonp("http://multimediatechnology.be/workload/stud.php?studentid="+ this.username+ "&initials="+ this.passwoord +"&callback=JSON_CALLBACK"
/* , {apikey:"test", params:{
studentid : $scope.username ,
initials : $scope.passwoord
}}*/
).success( function(data){
if (data.state == "Success") {
$(".formdiv").addClass("vanish");
$timeout(function(){ logincontroller.loggedin = true; Global.loggedin=true;}, 500).then( $("h2").addClass("slidein") );
$("body").addClass("whitebackground");
Global.achternaam = data.student.achternaam;
Global.voornaam = data.student.voornaam;
for(vak in data.courses){
for (code in Global.periodecodes ) {
if(data.courses[vak].periodecode == Global.periodecodes[code]){
Global.vakken.push(data.courses[vak]);
}
}
}
console.log(data.courses);
console.log(Global.vakken);
}else{
$(".loginform").addClass("shake");
$timeout(function(){ $(".loginform").removeClass("shake"); }, 500);
}
});
};
}]);
app.controller('TimeController', [ '$http', '$scope','$timeout', 'Global',function($http, $scope , $timeout , Global){
$scope.week;
$scope.date;
$scope.periodenaam = [];
$scope.periodecode = [];
$http.jsonp("http://multimediatechnology.be/workload/week.php?callback=JSON_CALLBACK").success( function(data){
//WEEK
$scope.week = data.weeknr;
console.log("week="+ $scope.week);
//DATUM
this.year = data.date.year;
this.month = data.date.month;
this.day = data.date.day;
if(this.month < 10){
this.month = "0"+this.month;
}
if(this.day < 10){
this.day = "0"+this.day;
}
$scope.date = this.year+"-"+this.month +"-"+this.day;
console.log("date="+ $scope.date);
});
$http.jsonp(" http://multimediatechnology.be/workload/periode.php?callback=JSON_CALLBACK").success( function(data){
for(periode in data.periods){
if( $scope.date > data.periods[periode].start.full && $scope.date < data.periods[periode].eind.full) {
Global.periodecodes.push(data.periods[periode].periodecode);
//$scope.periodenaam.push(data.periods[periode].periodenaam);
}else{
//not right period
}
}
console.log("alle periodecodes = "+ Global.periodecodes);
//console.log("alle periodenamen = "+ $scope.periodenaam);
});
}]);
app.controller('UserController', [ '$http', '$scope','$timeout', 'Global', '$rootElement',function($http, $scope , $timeout , Global, $rootElement){
this.data = Global;
this.savepunten = function(){
};
}])();
});
<!DOCTYPE html>
<html ng-app="studentfeedback">
<head>
<meta charset="utf-8">
<title>Student Feedback</title>
<link href='https://fonts.googleapis.com/css?family=Oxygen|Lobster|Nunito|Asap|Merriweather+Sans|Pacifico|Righteous|Comfortaa|Fredoka+One|Amaranth|Gloria+Hallelujah|Special+Elite' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="index.css" type="text/css">
</head>
<body >
<div class="formdiv" ng-controller="LoginController as Login" ng-hide="Login.loggedin">
<img class="owl" src="img/ow2l.png" alt="owl" />
<img class="owl2" src="img/owl3.png" alt="owl" />
<form name="loginform" class="loginform" ng-submit="loginform.$valid && Login.checklogin()" novalidate>
<h1>Student Feedback</h1>
<div class="login" ng-show="Login.panelToggle" >
<a class="logintab active" href="" >Login</a>
<a class="registreertab " href="" ng-click="Login.panelToggle = !Login.panelToggle">Registreer</a>
<label for="username">Studenten nummer</label>
<input type="input" name="username" id="username" value="0110495-12" placeholder="0086868-53" ng-model="Login.username" required>
<label for="passwoord">initialen</label>
<input type="input" name="passwoord" id="passwoord" placeholder="BD" ng-model="Login.passwoord" required>
Passwoord vergeten?
<input class="loginbutton" type="submit" name="login" class="preload" value="Login" >
</div>
<div class="register" ng-show="!Login.panelToggle">
<a class="logintab2" href="" ng-click="Login.panelToggle = !Login.panelToggle" >Login</a>
<a class="registreertab2 active" href="">Registreer</a>
<label for="studentennummer">Studentennummer</label>
<input type="input" name="studentennummer" id="studentennummer">
<label for="kdgmail">kdgmail</label>
<input type="input" name="kdgmail" id="kdgmail">
<label for="username">gebruikersnaam</label>
<input type="input" name="username" id="username">
<label for="password">passwoord</label>
<input type="password" name="password" id="password">
<input type="submit" name="registreer" class="preload" value="Registreer">
</div>
</form>
</div>
.
<div class="studentpanel" ng-controller="UserController as User" ng-show="User.data.loggedin">
<header class="clearfix">
<h2 class="s">{{User.data.voornaam +" "+ User.data.achternaam}} </h2>
<div class="weekdiv" ng-controller="TimeController as Time">
<div class="activeweek">
<h4 >WEEK {{week}}</h4>
</div>
</div>
</header>
<div class="vakkendiv clearfix">
<form method="post" ng-submit="Login.savepunten()" >
<div class="vakken" ng-repeat="vak in User.data.vakken" >
<p>{{vak.vaknaam}}</p>
<input class="punt" type="text">
<img class="underline" src="img/underline.png" alt="underline">
</div>
<input type="submit" name="oplsaan" value="Opslaan">
</form>
</div>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript" src="https://code.angularjs.org/1.5.0/angular.min.js"></script>
<script type="text/javascript" src="https://code.angularjs.org/1.5.0/angular-animate.min.js"></script>
<script type="text/javascript" src="js/jquery.spriteOnHover-0.2.5.min.js"></script>
<script type="text/javascript" src="base.js"></script>
<script type="text/javascript" src="style.js"></script>
</body>
</html>
There is a problem in your javascript file
var app = angular.module('studentfeedback', ['ngAnimate']);
app.factory('Global', function(){
var user = {};
user.loggedin = false;
user.achternaam;
user.voornaam;
user.vakken = [];
user.periodecodes = [];
return user;
})
/*
app.service('sharedProperties', function () {
var loggedin = false;
return {
getloggedin: function () {
return loggedin;
},
setloggedin: function(value) {
loggedin = value;
}
};
});
*/
app.controller('LoginController', [ '$http', '$scope','$timeout', 'Global', function($http, $scope , $timeout, Global ){
this.panelToggle = true; //true= login / false = register
this.loggedin = Global.loggedin;
//console.log("user:0110495-12, pass:LV ");
this.checklogin = function(){
var logincontroller = this;
//studentid 0110495-12 initials LV
$http.jsonp("http://multimediatechnology.be/workload/stud.php?studentid="+ this.username+ "&initials="+ this.passwoord +"&callback=JSON_CALLBACK"
/* , {apikey:"test", params:{
studentid : $scope.username ,
initials : $scope.passwoord
}}*/
).success( function(data){
if (data.state == "Success") {
$(".formdiv").addClass("vanish");
$timeout(function(){ logincontroller.loggedin = true; Global.loggedin=true;}, 500).then( $("h2").addClass("slidein") );
$("body").addClass("whitebackground");
Global.achternaam = data.student.achternaam;
Global.voornaam = data.student.voornaam;
for(vak in data.courses){
for (code in Global.periodecodes ) {
if(data.courses[vak].periodecode == Global.periodecodes[code]){
Global.vakken.push(data.courses[vak]);
}
}
}
console.log(data.courses);
console.log(Global.vakken);
}else{
$(".loginform").addClass("shake");
$timeout(function(){ $(".loginform").removeClass("shake"); }, 500);
}
});
};
}]);
app.controller('TimeController', [ '$http', '$scope','$timeout', 'Global',function($http, $scope , $timeout , Global){
$scope.week;
$scope.date;
$scope.periodenaam = [];
$scope.periodecode = [];
$http.jsonp("http://multimediatechnology.be/workload/week.php?callback=JSON_CALLBACK").success( function(data){
//WEEK
$scope.week = data.weeknr;
console.log("week="+ $scope.week);
//DATUM
this.year = data.date.year;
this.month = data.date.month;
this.day = data.date.day;
if(this.month < 10){
this.month = "0"+this.month;
}
if(this.day < 10){
this.day = "0"+this.day;
}
$scope.date = this.year+"-"+this.month +"-"+this.day;
console.log("date="+ $scope.date);
});
$http.jsonp(" http://multimediatechnology.be/workload/periode.php?callback=JSON_CALLBACK").success( function(data){
for(periode in data.periods){
if( $scope.date > data.periods[periode].start.full && $scope.date < data.periods[periode].eind.full) {
Global.periodecodes.push(data.periods[periode].periodecode);
//$scope.periodenaam.push(data.periods[periode].periodenaam);
}else{
//not right period
}
}
console.log("alle periodecodes = "+ Global.periodecodes);
//console.log("alle periodenamen = "+ $scope.periodenaam);
});
}]);
app.controller('UserController', [ '$http', '$scope','$timeout', 'Global', '$rootElement',function($http, $scope , $timeout , Global, $rootElement){
this.data = Global;
this.savepunten = function(){
};
}]);
body{
background-color:#d8d8d8 ;
font-family: 'Merriweather Sans', sans-serif;
margin: 0px;
animation-duration: 3s;
animation-fill-mode: both;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.ease{
-webkit-transition: all 2s ease ; /* property duration timing-function delay */
-moz-transition: all 2s ease ;
-o-transition: all 2s ease ;
transition: all 2s ease ;
}
.preload{
-webkit-transition: none !important;
-moz-transition: none !important;
-ms-transition: none !important;
-o-transition: none !important;
}
.loginform{
background-color: rgb(49, 49, 49);
box-shadow: 0 10px 15px 10px rgba(0,0,0,0.2);
margin-left: auto;
margin-right: auto;
margin-top: 10%;
width: 400px;
display: block;
overflow: auto;
animation-duration: 0.5s;
animation-fill-mode: both;
}
.formdiv{
margin-left: auto;
margin-right: auto;
margin-top: 10%;
width: 400px;
display: block;
animation-duration: 0.5s;
animation-fill-mode: both;
}
h1{
margin: 20px;
text-align: center;
font-family: 'Nunito', sans-serif;
color: white;
}
.registreertab, .logintab , .logintab2 , .registreertab2{
border: none;
background-color: rgb(42, 42, 42);
width: 50%;
float: left;
font-size: 18px;
color: white;
text-decoration: none;
text-align: center;
padding-top: 15px;
padding-bottom: 15px;
margin-bottom: 30px;
border-bottom: 1px solid white;
border-top: 1px solid white;
box-shadow: inset 0 0 0 0 white;
-webkit-transition: all ease 0.8s;
-moz-transition: all ease 0.8s;
transition: all ease 0.8s;
}
.active{
color: rgb(49, 49, 49);
background-color: white;
box-shadow: inset 0 0 0 0 rgb(42, 42, 42);
}
.loginhover {
box-shadow: inset 200px 0px 0px 0px rgb(42, 42, 42);
color: white;
}
.registreerhover{
box-shadow: inset 200px 0px 0px 0px white;
color: rgb(49, 49, 49);
}
.loginhover2 {
box-shadow: inset -200px 0px 0px 0px rgb(42, 42, 42);
color: white;
}
.registreerhover2{
box-shadow: inset -200px 0px 0px 0px white;
color: rgb(49, 49, 49);
}
label{
margin-left: 10%;
color: white;
margin-top: 10px;
margin-bottom: 10px;
display: block;
}
input{
margin-left: 10%;
margin-top: 10px;
margin-bottom: 20px;
display: block;
transition: border 0.4s;
border: none;
}
input:not(:last-child){
width: 80%;
height: 30px;
font-size: 18px;
border-radius: 2px;
box-shadow: 0px 5px 7px rgba(0,0,0,0.2);
}
.loginbutton{
margin-right: 10%;
background-color: green;
border-radius: 30px;
color: white;
float: right;
padding: 8px;
padding-left: 30px;
padding-right: 30px;
font-weight: 700;
font-size: 15px;
outline: none;
/* transition: [transition-property] [transition-duration] [transition-timing-function] [transition-delay]; */
-webkit-transition: background-color 0.5s ease, color 0.5s ease ;
-moz-transition: background-color 0.5s ease, color 0.5s ease;
-ms-transition: background-color 0.5s ease, color 0.5s ease;
-o-transition: background-color 0.5s ease, color 0.5s ease;
transition: background-color 0.5s ease, color 0.5s ease;
}
.loginbutton:hover{
background-color: rgb(165, 255, 165);
color: green;
}
input.ng-invalid{
outline-color: #FA787E;
border: 1px solid #FA787E;
}
input.ng-valid{
outline-color: #78FA89;
border: 1px solid #78FA89;
}
.passlink{
display: inline-block;;
font-size: 13px;
margin-top: 15px;
margin-left: 10%;
color: white;
}
.owl{
position: absolute;
z-index: -1;
margin-left: 240px;
width: 150px;
animation-name: OwlSearchingForYou;
animation-duration: 30s;
animation-iteration-count: infinite;
}
.owl2{
position: absolute;
float: right;
margin-top: 10%;
z-index: -1;
width: 150px;
animation-name: OwlSearchingForYou2;
animation-duration: 30s;
animation-iteration-count: infinite;
}
#keyframes OwlSearchingForYou {
0%,35%, 53% {transform: translateX(0);}
40%, 50%{transform: translateX(130px);}
}
#keyframes OwlSearchingForYou2 {
0%,82%, 100% {transform: translateX(0);}
87%, 97%{transform: translateX(-110px);}
}
#keyframes shake {
0%, 100% {transform: translateX(0);}
10%, 50%, 90% {transform: translateX(-10px);}
30%, 70% {transform: translateX(10px);}
}
.shake {
-webkit-transform: translate3d(0,0,0);
animation-name: shake;
}
#keyframes vanish {
0% {transform: scale(1); opacity: 1;}
100% {transform: scale(1.15); opacity: 0;}
}
.vanish {
-webkit-transform: translate3d(0,0,0);
animation-name: vanish;
}
/*USER INTERFACE*/
h2 {
color: white;
font-size: 2vw;
margin: 0px;
display: inline;
margin-top: 5%;
margin-bottom: 5%;
padding-top: 2%;
float: left;
height: 130px;
width: 50%;
text-align: center;
animation-duration: 2s;
animation-fill-mode: both;
background-image: url(img/paperstroke3.png);
background-repeat: no-repeat;
background-size: 100%;
}
#keyframes slidein {
0% {transform: translateX(-100%); }
100% {transform: translateX(0px); }
}
.slidein {
-webkit-transform: translate3d(0,0,0);
animation-name: slidein;
}
#keyframes whitebackground {
0% { background-image:url(img/flatcolor.jpg) ;}
100% {background-image:url(img/table.jpg);}
}
.whitebackground {
animation-name: whitebackground;
}
.weekdiv{
float: right;
width: 50%;;
}
h3, h4{
font-family: 'Special Elite', cursive;
margin: 0px;
text-align: center;
display: block;
margin-right: 2%;
}
h4, .activeweek a{
display: inline-block;
vertical-align: top;
}
h4{
font-size: 4vw;
padding-top: 10%;
padding-bottom: 10%;
width: 18vw;
}
.activeweek{
height: 10vw;
font-size: 4vw;
margin-bottom: 50px;
background-image: url(img/week.png);
background-size: 100%;
background-repeat: no-repeat;
}
#prevweek{
width: 24.1666666666%;
float: left;
display: inline-block;
height: 83.854166666666%;
background: url(img/spritesheetprevweek.png) ;
background-size: 1500%;
}
.vakkendiv{
margin-top: 200px;
width: 80%;
margin: auto;
}
.vakken{
float: left;
display: inline-block;
height: 200px;
width: 200px;
background-image: url(img/yellow-sticky-note.png);
background-size: cover;
margin-right: 20px;
margin-bottom: 20px;
-webkit-transition: all 1s ease ;
-moz-transition: all 1s ease;
-ms-transition: all 1s ease;
-o-transition: all 1s ease;
transition: all 1s ease;
}
.vakken.ng-enter{
opacity: 0;
-webkit-transition:0.5s linear all;
transition:0.5s linear all
}
.vakken.ng-enter-stagger{
-webkit-transition-delay: 0.4s;
-moz-transition-delay: 0.4s;
-ms-transition-delay: 0.4s;
-o-transition-delay: 0.4s;
transition-delay: 0.4s;
-webkit- transition-duration: 0s;
-moz- transition-duration: 0s;
-ms- transition-duration: 0s;
-o- transition-duration: 0s;
transition-duration: 0s;
}
.vakken.ng-enter-active{
opacity: 1;
}
.vakken p {
text-align: center;
height: 25%;
}
input.punt{
margin: auto;
height: 45%;
width: 85%;
margin-left: 5%;
text-align: center;
font-size: 45px;
outline: none;
box-shadow: none;
font-family: 'Gloria Hallelujah', cursive;
background-color: rgba(255, 255, 255, 0);
}
.underline{
width: 70%;
opacity: 0.8;
vertical-align: top;
margin-left: 15%;
}
/*CLEARFIX*/
.clearfix:after {
content: " "; /* Older browser do not support empty content */
visibility: hidden;
display: block;
height: 0;
clear: both;
}
<!DOCTYPE html>
<html ng-app="studentfeedback">
<head>
<meta charset="utf-8">
<title>Student Feedback</title>
<link href='https://fonts.googleapis.com/css?family=Oxygen|Lobster|Nunito|Asap|Merriweather+Sans|Pacifico|Righteous|Comfortaa|Fredoka+One|Amaranth|Gloria+Hallelujah|Special+Elite' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="index.css" type="text/css">
</head>
<body >
<div class="formdiv" ng-controller="LoginController as Login" ng-hide="Login.loggedin">
<img class="owl" src="img/ow2l.png" alt="owl" />
<img class="owl2" src="img/owl3.png" alt="owl" />
<form name="loginform" class="loginform" ng-submit="loginform.$valid && Login.checklogin()" novalidate>
<h1>Student Feedback</h1>
<div class="login" ng-show="Login.panelToggle" >
<a class="logintab active" href="" >Login</a>
<a class="registreertab " href="" ng-click="Login.panelToggle = !Login.panelToggle">Registreer</a>
<label for="username">Studenten nummer</label>
<input type="input" name="username" id="username" value="0110495-12" placeholder="0086868-53" ng-model="Login.username" required>
<label for="passwoord">initialen</label>
<input type="input" name="passwoord" id="passwoord" placeholder="BD" ng-model="Login.passwoord" required>
Passwoord vergeten?
<input class="loginbutton" type="submit" name="login" class="preload" value="Login" >
</div>
<div class="register" ng-show="!Login.panelToggle">
<a class="logintab2" href="" ng-click="Login.panelToggle = !Login.panelToggle" >Login</a>
<a class="registreertab2 active" href="">Registreer</a>
<label for="studentennummer">Studentennummer</label>
<input type="input" name="studentennummer" id="studentennummer">
<label for="kdgmail">kdgmail</label>
<input type="input" name="kdgmail" id="kdgmail">
<label for="username">gebruikersnaam</label>
<input type="input" name="username" id="username">
<label for="password">passwoord</label>
<input type="password" name="password" id="password">
<input type="submit" name="registreer" class="preload" value="Registreer">
</div>
</form>
</div>
.
<div class="studentpanel" ng-controller="UserController as User" ng-show="User.data.loggedin">
<header class="clearfix">
<h2 class="s">{{User.data.voornaam +" "+ User.data.achternaam}} </h2>
<div class="weekdiv" ng-controller="TimeController as Time">
<div class="activeweek">
<h4 >WEEK {{week}}</h4>
</div>
</div>
</header>
<div class="vakkendiv clearfix">
<form method="post" ng-submit="Login.savepunten()" >
<div class="vakken" ng-repeat="vak in User.data.vakken" >
<p>{{vak.vaknaam}}</p>
<input class="punt" type="text">
<img class="underline" src="img/underline.png" alt="underline">
</div>
<input type="submit" name="oplsaan" value="Opslaan">
</form>
</div>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript" src="https://code.angularjs.org/1.5.0/angular.min.js"></script>
<script type="text/javascript" src="https://code.angularjs.org/1.5.0/angular-animate.min.js"></script>
<script type="text/javascript" src="js/jquery.spriteOnHover-0.2.5.min.js"></script>
<script type="text/javascript" src="base.js"></script>
<script type="text/javascript" src="style.js"></script>
</body>
</html>
I think there's and issue with }])(); in the javascript file

Fluid Horizontal NavBar for responsive website

Im trying to make a fluid responsive web that contains an horizontal navbar, my problem is that at a certain width of the browser window the elements of the bar start to relocate one on top each other, is there any way to avoid this behavior in order to make the navbar just stretch until a certain media query break point. I need to website to look al least decent in the ranges where the querys are not activated.
Here's how things look so far:
http://wearehellyeah.com/test/home_formacio.html
<div class="barra">
<!--Menu Principal-->
<nav class="menu-principal">
<ul class="menu">
<li class="item sub"><button type="button" id="menu-lateral" class="sb-toggle-left"><img src="img/iconos/menu.png" alt="search"></button></li>
<li class="item">Actualitat</li>
<li class="item">Activitat de l'oficina</li>
<li class="item">Vocalies</li>
<li class="item">Formació</li>
<li class="item">Serveis</li>
<li class="item">Actualitat</li>
<li class="item no-border">El Col-legi</li>
<li class="item home">Marcar com pàgina d'inici</li>
<li class="item conectados">Conectados 103</li>
<li class="item"><button type="button" id="search"><img src="img/iconos/search.png"></button></li>
</ul>
</nav>
<!--Fin Menu Principal-->
<!--Input buscador-->
<div class="buscador">
<form action="">
<input type="text" id="ip-search">
</form>
</div>
<!--Fin de Input Buscador-->
</div>
The CSS:
.barra {
background: #00b1da;
width: 100%;
padding: 0;
}
.menu-principal {
height: 36px;
line-height: 35px;
margin: 0 auto;
max-width: 1024px;
position: relative;
width: 100%;
}
.menu {
padding: 0;
margin: 0;
}
.menu .item {
float: left;
list-style: none;
}
.menu .item a {
border-right: 1px solid #008ba9;
color: #fff;
font-size: 13px;
padding: 0 .98em;
text-decoration: none;
white-space: nowrap;
}
.menu .sub {
background: #008ba9;
padding: 0 .4em;
height: 35px;
display: block;
}
.conectados {
background: #fff;
color: #4b585b;
font-size: 13px;
padding: .1em 1em 0 2.3em;
position: relative;
}
.menu .home {
background: url("../img/iconos/home.png") no-repeat 2% #00a9a1;
border-left: 1px solid #40c2d3;
padding: 0 0 0 1em;
}
You could add a min-width:
.menu-principal {
min-width:883px;
}
Then it won't go on top of each other. However there are too many options on the navigation bar, you might want to make it a drop-down box when it goes into a mobile media-query range.
e.g. http://vagish.com (as you make the browser width smaller, it changes the navigation bar)
You could have a media query which takes place between 768px and 880px, and reduces the spacing between menu items, and this should be able to make it look fine until you hit the 768px media query.
This would work (along with the CSS above):
#media all and (max-width: 768px) and (min-width: 880px) {
.menu-principal {
padding:0px;
}
.menu-med .item a {
padding:0 .69em;
}
}

Image not responding to browser size

I am trying to make an image respond to the browser size, so that when the browser is smaller, the image responds so that there is no scrolling involved. I found a similar question here How can I resize an image dynamically with CSS as the browser width/height changes?, but I'm not able to make that solution work. What am I missing?
I'm including my code below - I am using Wordpress, so it puts a "p" tag around my image automatically, wrapping my image in a paragraph. Also, I'm not sure if I'm including too much code for this purpose, but I wanted to make sure it was all there in case there's an error in a strange place that could be causing the problem...
Here is my html:
<body>
<div id="pop_up_page">
<div class="content_well_pop">
<div class="content_pop">
<div class="portfolio_workspace_9">
<h2>Here's the Header</h2>
</div>
<div class="portfolio_workspace_8">
<p>
<img src="heres_the_image"/>
</p>
</div>
</div>
</div>
</div>
</body>
Here's my CSS:
body {
background-attachment: fixed;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
padding: 0;
height: 100%;
}
#pop_up_page {
background-attachment: fixed;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
padding: 0;
height: 100%;
.content_well_pop {
left: 0;
width: 100%;
}
.portfolio_workspace_9 {
width: 1000px;
margin: 15px 0 0 0px;
position: relative;
float: left;
display:block;}
.portfolio_workspace_8 {
width: 1000px;
margin: 0px 0 50px 0px;
position: relative;
float: left;
height: auto;
display:block;}
p{font-family: "Franklin Gothic Book";
font-size: 15px;
color: #757372;
display: block;
}
.portfolio_workspace_8 img {
margin-left: auto;
margin-right: auto;
display: block;
max-width: 100%;
height: auto;
}
Thanks
this css rule here:
.portfolio_workspace_8 {
width: 1000px;
margin: 0px 0 50px 0px;
position: relative;
float: left;
height: auto;
display:block;
}
You are specifiying a width on the parent container of the image. Change it to max-width instead of width.
Here is an javascrpt-free, crossbrowser-stable solution you are looking for. I have implemented it in past on that website: http://www.gardinenhaus-morgen.de/.
HTML:
<html>
<body>
<div id="page-wrapper">
<div id="inner-wrapper">
<!-- your content here -->
</div>
</div>
<div id="bg">
<div>
<table cellpadding="0" cellspacing="0">
<tr>
<td>
<img alt="background" src="<bild>" />
</td>
</tr>
</table>
</div>
</div>
</body>
</html>
CSS:
#bg div
{
position: absolute;
width: 200%;
height: 200%;
top: -50%;
left: -50%;
}
#bg td
{
vertical-align: middle;
text-align: center;
}
#page-wrapper
{
position: absolute;
top: 0;
left: 0;
z-index: 70;
overflow: auto;
width: 100%;
height: 100%;
}
#inner-wrapper
{
margin: 30px auto;
width: 1000px;
}

Footer content positioning problem with WooFoo Contact Form and IE7

I am working with a to client fix a problem on a single page. On all pages, the footer content is positioned and displays properly. However, on this page, when viewed in IE7 the footer content moves up into the body area. The only difference between this page and all the other is the presence of a WooFoo contact form.
I have tried a zillion different ways to bump that content down, but it will not respond to padding or margin adjustments.
Here is the HTML:
<div id="footer">
<div class="width">
<ul class="footerNav">
<li><a class="bFB" href="http://www.facebook.com/pages/Charlotte-NC/The-Idea-People/124178504825" target="_blank" title="The Idea People Charlotte web design facebook">FaceBook</a></li>
<li><a class="bTW" href="http://twitter.com/theideapeople" target="_blank" title="The Idea People Charlotte web design twitter">Twitter</a></li>
<li><a class="bEM" href="http://feedburner.google.com/fb/a/mailverify?uri=theideapeople" target="_blank" title="The Idea People Charlotte web design email">FeedBurner</a></li>
<li><a class="bRSS" href="http://feeds.feedburner.com/theideapeople" target="_blank" title="The Idea People Charlotte web design rss">RSS</a></li>
</ul>
<br class="clear" />
<ul class="termNav">
<li>Terms of Use |</li>
<li>Privacy Policy</li>
</ul>
<p class="copyright">©2010 The Idea People. All Rights Reserved.</p>
<p class="company">Charlotte, NC web design, graphic design and internet marketing</p>
<div id="address"> <strong>The Idea People</strong><br />
4424 Taggart Creek Rd., Suite 111<br />
Charlotte, NC 28208 </div>
<div id="phone"> <strong>T</strong> 704.398.4437<br />
<strong>F</strong> 704.398.4438<br />
<strong>E</strong> ideas#theideapeople.com </div>
<br class="clear"/>
</div>
</div>
Here is the CSS:
#footer { clear: both; background: url(../images/bg_footer.png) 0 0 no-repeat; padding: 10px 0 76px; color: #ccc; font-size: 14px; font-weight: bold; }
#footer .width { position: relative; margin: 0 auto; width: 960px; }
.footerNav { width: 300px; height: 30px; font-size: 15px; position: relative; top: 5px; left: 770px; }
.footerNav li { position:relative; float:left; margin:0; }
.footerNav li a { color: #fff; display: block; text-decoration: none; font-weight: bold; text-indent: -9999px; }
.footerNav li a.bRSS { background: url(../images/icon-rss.png) 0 0 no-repeat; width: 28px; height: 28px; padding-left: 26px; }
.footerNav li a.bFB { background: url(../images/icon-facebook.png) 0 0 no-repeat; width: 28px; height: 28px; padding-left: 26px; }
.footerNav li a.bTW { background: url(../images/icon-twitter.png) 0 0 no-repeat; width: 28px; height: 28px; padding-left: 26px; }
.footerNav li a.bEM { background: url(../images/icon-email.png) 0 0 no-repeat; width: 28px; height: 28px; padding-left: 26px; }
Any help in resolving this will be greatly appreciated!
Thanks.
The .footerNav element is causing overflow and busting the layout. I even get horizontal scrollbars on my machine, on all browsers.
The following CSS seems to fix it:
.footerNav
{
/* Add clear and float
*/
clear: left;
float: right;
font-size: 15px;
height: 30px;
top: 5px;
/* Delete these 3
position: relative;
left: 770px;
width: 300px;
*/
}

Resources