How to create an animation for my navbar? - html

I want to add an animation for the navbar. I tried many ways but it didn't work. I deleted some CSS code because it wasn't important for the code.
<div class="navbar" style="position: sticky; top: 0;">
<div class="logo">
<a href="../index.php">
<img src="../assets/icon/logo.png" />
<div class="title">Nexton</div>
</a>
</div>
<div class="right">
<div class="directory-open">
<a href="../user/index.php?user">
<i class="bi bi-person-gear"></i>
<?php echo $_SESSION['username']; ?>
</a>
<a href="../pages/logout.php">
<i class="bi bi-box-arrow-left"> Kijelentkezés</i>
</a>
</div>
<div class="directory-collapsed">
<div class="btn">
<i class="bi bi-person-gear" style="color: white;"></i>
</div>
<div class="dropdown" style="z-index: 2;">
<div class="directory-drop-down">
<a href="../user/index.php?user">
<?php echo $_SESSION['username']; ?>
</a>
Kijelentkezés
</div>
</div>
</div>
</div>
</div>
My full code can be found here
I tried to add an animation but it didn't work. Can somebody help me?
Any help will be appreciated.

Related

Cut the text length as the screen gets smaller

I want the text length to shrink when the screen gets smaller
<div class="dress-card hvr-bob">
<div class="dress-card-head">
<img class="dress-card-img-top" src="img/rdr2.jpg" alt="">
</div>
<div class="dress-card-body">
<h2 class="dress-card-title">Red Dead Redemption 2</h2>
<p class="dress-card-para">Social Club Key</p>
<p class="dress-card-para"><span class="dress-card-price">200TL  </span>
<!--<span class="dress-card-crossed">300TL</span><span class="dress-card-off"> İndirim!</span>--></p>
<div class="row">
<div class="col-md-6 card-button">
<a style="text-decoration: none;" href="">
<div class="card-button-inner bag-button"><i class="fas fa-shopping-cart"></i> Satın Al</div>
</a>
</div>
<div class="col-md-6 card-button">
<a style="text-decoration: none;" href="">
<div class="card-button-inner wish-button"><i class="fas fa-shopping-basket"></i> Sepete Ekle</div>
</a>
</div>
</div>
</div>
</div>
</div>
help
Add font-size:8vw; to your CSS. You can add it to p or specific for a class or id.
You can change the 8 to any number you want.
I hope thats what you searching :)

Bootstrap is acting up from slight height pixel change

I'm using bootstrap for an easy responsive design. However, I moved computer today and was going to work on my project some more and my design is acting up (See attached figures). I have tested to see if I changed width, would it act up; no it did not. I then played with the height of my browsers to see if it did and yes it did act up and displayed improperly. I am fairly new-ish to bootstrap, but I am not sure what is causing this or could be on something on my computer end. I used Chrome for both viewing. I also tested with Edge and it displayed properly.
Look top-right for view port
This is what it should look like
This is what I get when changing resolution
At request, another part of the code which is loaded via JS.
<body>
<div id="interfaceNaviation" style="position:relative;top:0;left:0;right:0;background-color:green;">
<div class="navBar"><span class="navLink">Home</span> <span class="navLink">Presentation</span> <span class="navLink">Schedules</span> <span class="navLink">Display</span></div>
<br>
<div id="loginInfo">
<button id="signinButton" type="button" class="btn btn-primary btn-fixed-width navbar-btn" style="visibility: visible; display: inline;">
Sign in <i class="fa fa-white fa-sign-in icon-right"></i>
</button>
<a href="javascript:void(0);" id="signoutButton" class="navbar-nav" style="visibility: hidden; display: none;">
<span>Sign Out</span>
<i class="fa fa-blue-custom fa-sign-out"></i>
</a>
<div style="display:inline;" id="signinText">Authorize requests using OAuth 2.0:</div>
</div>
</div>
<div id="pres_interface" class="container-fluid" style="height:90%;">
<div id="pres_options" class="row" style="height:5%;">
<div id="add-placeholder" class="col-xs-2"><button id="btn_add-placeholder" class="btn btn-success fa-1.2x">Add Placeholder</button></div>
</div>
<!--style="left:0px;width:20%;height:100%;position:relative;"-->
<div id="pres_editor_panel" class="row" style="height:95%">
<div class="col-xs-2">
<div id="editor_display">
<div id="placeholderContainer"><span class="header fa-1.2x">Placeholders</span></div>
<li><span name="placeholders-change" class="fa-1.2x" data-id="ph1">ph1 <i data-id="void" class="fa fa-trash-o"></i></span></li>
<li><span name="placeholders-change" class="fa-1.2x" data-id="ph2">ph2 <i data-id="void" class="fa fa-trash-o"></i></span></li>
<li><span name="placeholders-change" class="fa-1.2x" data-id="ph04">ph04 <i data-id="void" class="fa fa-trash-o"></i></span></li>
<li><span name="placeholders-change" class="fa-1.2x" data-id="Test">Test <i data-id="void" class="fa fa-trash-o"></i></span></li>
<li><span name="placeholders-change" class="fa-1.2x" data-id="Test1">Test1 <i data-id="void" class="fa fa-trash-o"></i></span></li>
</div>
</div>
<!-- style="width:79.9%;height:100%" -->
<div class="col-xs-10 fa-padless-left">
<iframe id="fake_view" src="fake_view.html" style="width:100%;height:100%;border:1px solid #081D79;"></iframe>
</div>
</div>
</div>
<div id="pres_options-lower" style="background-color:purple;left:0;right:0;text-align:right;bottom:0;">
<button>Restore</button>
<button>Save</button>
<button>Publish</button>
</div>
<div id="window_mask" class="mask hidden"></div>
<div id="popup_display" class="hidden"></div>
<div id="sub_popup_display" class="hidden"></div>
<div id="sub_window_mask" class="mask hidden"></div>
</body>
This is my body code WITHOUT being edited via JS:
<body>
<div id="interfaceNaviation" style="position:relative;top:0;left:0;right:0;background-color:green;">
<div class="navBar"><span class="navLink">Home</span> <span class="navLink">Presentation</span> <span class="navLink">Schedules</span> <span class="navLink">Display</span></div>
<br /><div id="loginInfo">
<button id="signinButton" type="button" class="btn btn-primary btn-fixed-width navbar-btn">
Sign in <i class="fa fa-white fa-sign-in icon-right"></i>
</button>
<a href="javascript:void(0);" id="signoutButton" class="navbar-nav">
<span>Sign Out</span>
<i class="fa fa-blue-custom fa-sign-out"></i>
</a>
<div style="display:inline;" id="signinText"></div>
</div>
</div>
<div id="pres_interface" class="container-fluid" style="height:90%;" >
<div id="pres_options" class="row" style="height:5%;">
<div id="add-placeholder" class="col-xs-2"><button id="btn_add-placeholder" class="btn btn-success fa-1.2x">Add Placeholder</button></div>
</div>
<!--style="left:0px;width:20%;height:100%;position:relative;"-->
<div id="pres_editor_panel" class="row" style="height:95%">
<div class="col-xs-2">
<div id="editor_display" >
</div>
</div>
<!-- style="width:79.9%;height:100%" -->
<div class="col-xs-10 fa-padless-left">
<iframe id="fake_view" src="fake_view.html" style="width:100%;height:100%;border:1px solid #081D79;" ></iframe>
</div>
</div>
</div>
<div id="pres_options-lower" style="background-color:purple;left:0;right:0;text-align:right;bottom:0;">
<button>Restore</button>
<button>Save</button>
<button>Publish</button>
</div>
<div id="window_mask" class="mask hidden"></div>
<div id="popup_display" class="hidden"></div>
<div id="sub_popup_display" class="hidden"></div>
<div id="sub_window_mask" class="mask hidden"></div>
</body>
Thanks for any help! I am stumped at this right now.

HTML Div boxes alignment

This is what I want it to look like:
I am trying to create an html file that has 5 div boxes like the picture shown above. I have the first three done but I am not sure how to do the bottom two. Any help is appreciated
<div class="row divcenter" style="max-width: 1000px;">
<div class="col-sm-4 bottommargin">
<div class="team">
<div class="team-image">
<img src="images/team/1.jpg" alt="ThreatVulnManage">
<div class="team-overlay">
<div class="team-social-icons">
<a class="si-borderless si-facebook" title="Facebook">
<i style="color:#fff;padding-top: 10px"><ul>Penetration Testing</ul></i>
<i style="color:#fff"><ul>Vulnerability Scans</ul></i>
<i style="color:#fff"><ul>Red/Blue/Purple Team Exercise</ul></i>
<i style="color:#fff"><ul>Black Team</ul></i>
</a>
</div>
</div>
</div>
<div class="team-desc team-desc-bg">
<div class="team-title"><h4>Threat & Vulnerability Management</h4></div>
</div>
</div>
</div>
<div class="col-sm-4 bottommargin">
<div class="team">
<div class="team-image">
<img src="images/team/2.jpg" alt="EnterpriseRiskCompliance">
<div class="team-overlay">
<div class="team-social-icons">
<a class="si-borderless si-facebook" title="Facebook">
<i style="color:#fff"><ul>IT Security Assessment & Cyber Breach Risk Assessment</ul></i>
<i style="color:#fff"><ul>HIPAA & PCI-DSS</ul></i>
<i style="color:#fff"><ul>Third-Party Vendor Risk Assessment</ul></i>
<i style="color:#fff"><ul>Cloud App Risk Assessment</ul></i>
<i style="color:#fff"><ul>Data Discovery Mapping & Classification</ul></i>
<i style="color:#fff"><ul>Compliance Management</ul></i>
</a>
</div>
</div>
</div>
<div class="team-desc team-desc-bg">
<div class="team-title"><h4>Enterprise <br>Risk & Compliance</h4></a></div>
</div>
</div>
</div>
<div class="col-sm-4 bottommargin">
<div class="team">
<div class="team-image">
<img src="images/team/3.jpg" alt="SecurityProgramStrategy">
<div class="team-overlay">
<div class="team-social-icons">
<a class="si-borderless si-facebook" title="Facebook">
<i style="color:#fff;padding-top: 10px"><ul>Infosec Program Development</ul></i>
<i style="color:#fff"><ul>ISO 27002</ul></i>
<i style="color:#fff"><ul>NIST</ul></i>
</a>
</div>
</div>
</div>
<div class="team-desc team-desc-bg">
<div class="team-title"><h4>Security Program <br>Strategy</h4></div>
</div>
</div>
</div>
</div>
<div class="row divcenter" style="max-width: 1000px;">
<div class="col-sm-4 bottommargin">
<div class="team">
<div class="team-image element-5">
<img src="images/team/1.jpg" alt="Trust">
<div class="team-overlay">
<div class="team-social-icons">
<a class="si-borderless si-facebook" title="Facebook">
<i style="color:#fff;padding-top: 10px"><ul>T-Score</ul></i>
<i style="color:#fff"><ul>R-Score</ul></i>
<i style="color:#fff"><ul>PNProtect</ul></i>
<i style="color:#fff"><ul>Trust Restoration Framework</ul></i>
</a>
</div>
</div>
</div>
<div class="team-desc team-desc-bg">
<div class="team-title"><h4>Trust</h4></div>
</div>
</div>
</div>
<div class="col-sm-4 bottommargin">
<div class="team">
<div class="team-image element-4">
<img src="images/team/2.jpg" alt="EducationAwareness">
<div class="team-overlay">
<div class="team-social-icons">
<a class="si-borderless si-facebook" title="Facebook">
<i style="color:#fff;padding-top: 10px"><ul>Security Awareness Training</ul></i>
<i style="color:#fff"><ul>Secure Code Review Training</ul></i>
<i style="color:#fff"><ul>Human Breach Prevention Project</ul></i>
</a>
</div>
</div>
</div>
<div class="team-desc team-desc-bg">
<div class="team-title"><h4>Education & Awareness</h4></div>
</div>
</div>
</div>
Hard to say exactly, without knowing how you're structuring your code. If everything is within one container, you could set it's text-align to center and have the elements within it have display: inline-block.
<div class="wrapper">
<div class="child">
<div class="child">
<div class="child">
<div class="child">
<div class="child">
</div>
And css:
.wrapper {
text-align: center;
}
.child {
display: inline-block;
width: 100px;
height: 100px;
background-color: #777777;
margin: 15px;
}
As long as the children are too wide to all fit on the same row in the wrapper, they'll move on to the next row. Alternatively you can place a <br> element to force them to wrap to a new row or just put them children in separate <div>s
I am very new to coding, and I'm sorry if this suggestion does not help you. I am trying to answer questions so maybe I can learn more myself.
I would do something like this in css:
#boxes {
float: left;
position: relative;
}
.box4 {
clear: left;
}
Then edit the margin accordingly.

Foreach loop for image slide show does not work

I am trying to parse some data and images from controller to show on view. I implemented a foreach loop to show some images in slideshow. But whenever I run the code only the first image appears inside the body, and other images and information goes below the footer. I am not getting what mistake I made in this code.
My code is-
<div class="row wrapper border-bottom white-bg page-heading">
<div class="col-lg-10">
<h2>#ViewBag.Title</h2>
<ol class="breadcrumb">
<li class="active">
Back
</li>
</ol>
</div>
</div>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Search</title>
</head>
<body>
<div>
#foreach (var item in ViewBag.Cities) {
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>#item.Name</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
</div>
</div>
<div class="ibox-content">
<p>#item.Shorttext</p>
</div>
</div>
</div>
foreach (var image in item.Images) {
<div class="col-lg-5">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>Animation without caption</h5>
</div>
<div class="ibox-content">
<div class="carousel slide" id="carousel1">
<div class="carousel-inner">
<div class="item active">
<img alt="image" class="img-responsive" src="#image" style="height:400px;width:600px">
</div>
</div>
<a data-slide="prev" href="#carousel1" class="left carousel-control">
<span class="icon-prev"></span>
</a>
<a data-slide="next" href="#carousel1" class="right carousel-control">
<span class="icon-next"></span>
</a>
</div>
</div>
</div>
</div>
} }
</div>
</body>
</html>
My view is looking like this.
Hope it will solve your issue.
<div class="col-lg-10">
<h2>#ViewBag.Title</h2>
<ol class="breadcrumb">
<li class="active">
Back
</li>
</ol>
</div>
</div>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Search</title>
</head>
<body>
<div>
#foreach (var item in ViewBag.Cities) {
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>#item.Name</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
</div>
</div>
<div class="ibox-content">
<p>#item.Shorttext</p>
</div>
</div>
</div>
}
foreach (var image in item.Images) {
<div class="col-lg-5">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>Animation without caption</h5>
</div>
<div class="ibox-content">
<div class="carousel slide" id="carousel1">
<div class="carousel-inner">
<div class="item active">
<img alt="image" class="img-responsive" src="#image" style="height:400px;width:600px">
</div>
</div>
<a data-slide="prev" href="#carousel1" class="left carousel-control">
<span class="icon-prev"></span>
</a>
<a data-slide="next" href="#carousel1" class="right carousel-control">
<span class="icon-next"></span>
</a>
</div>
</div>
</div>
</div>
}
</div>
</body>
</html>

How to make images , iframes, icons stand beside texts without break

I've spent three hours trying to reproduce the image above, however I am unable to make the texts remain on the side and centered with facebook-pile and icons. Can anyone help me?
Code:
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<section class="social-media">
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="fb-pile">
<h2> no Facebook:</h2>
<div class="fb-facepile" data-href="https://www.facebook.com/facebookdevelopers" data-max-rows="1" data-colorscheme="light" data-size="small" data-show-count="true"></div>
</div>
</div>
<div class="col-md-4">
<div class="social-icons">
<h2>Compartilhar:</h2>
<a target="_blank" href="" title="Ir para página do facebook">
<span class="fa fa-facebook fa-2x"></span>
</a>
<a target="_blank" href="" title="Ir para página do twitter">
<span class="fa fa-twitter fa-2x"></span>
</a>
<a target="_blank" href="" title="Ir para página do instagram">
<span class="fa fa-instagram fa-2x"></span>
</a>
</div>
</div>
<div class="col-md-2">
<div class="trip-advisor">
<img class="trip-advisor-img" title="Recomende o Pub Crawl no Trip Advisor" src="http://upload.wikimedia.org/wikipedia/fr/1/1d/TripAdvisor-logo.png"/>
</div>
</div>
</div>
</div>
</section>
Try changing the .social-media h2 style to include display: inline-block instead of floating it:
http://codepen.io/a_double/pen/EayaOa