I am currently practicing making a simple website. I have a problem in the navigation bar above my website. When I scroll further down my website, their color when I hover and their responsiveness disappears. Here's a pic to help you understand my problem.
I don't know if I use some codes right but here's my code, you can leave a tip or you can also add on how the code works so I can correct my mistake.
html,body{
height: 163%;
}
body{
background: rgba(236,232,225,255);
color: #333;
font-family: helvetica;
font-size: 15px;
line-height: .5cm;
margin: 0;
padding: 0;
}
/* links configuration here */
a{
text-decoration: none;
}
a:hover{
color:rgba(216, 108, 108, 0.932);
}
/* links configuration ends here */
.whole{
margin-left: 50px;
margin-right: 50px;
font-size: 15px;
}
#webname{ /* heading here */
margin-top: 17%;
margin-bottom: 17%;
text-align: center;
font-size: 150px;
font-family: VALORANT;
color:white;
}
#webname:hover{
color: rgba(216, 110, 110, 0.933);
cursor: default;
}
.topnav {
position: fixed;
overflow: hidden;
background-color: #333;
padding-top: 10px;
padding-bottom: 10px;
top: 0;
width: 100%;
}
.topnav a{
color: white;
padding-top: 15px;
padding-left: 25px;
padding-right: 5px;
float: left;
font-family: VALORANT;
font-size: 25px;
display: block;
}
.topnav a:hover{
color: rgba(216, 108, 108, 0.932);
}
.topnav img{
float: right;
padding-right: 15px;
}
#videoBG{ /* background vid */
position: absolute;
right: 0;
bottom: 30%;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
background-size: cover;
overflow: hidden;
}
/* Paragraphs starts here */
.gameplay{ /* First Paragraph here */
margin-top: 10px;
width: 30%;
float: left;
}
#paraFirst {
font-family: VALORANT;
font-size: 30px;
width: 38%;
}
#paraFirst:hover{
color: rgba(216, 108, 108, 0.932);
cursor: default;
}
.agents{ /* Second Paragraph here */
position: relative;
top: 250px;
float: right;
width: 40%;
}
#paraSec{
font-family: VALORANT;
font-size: 30px;
width: 20%;
}
#paraSec:hover{
color: rgba(216, 108, 108, 0.932);
cursor: default;
}
.guns{
position: relative;
top: 370px;
float: left;
width: 40%;
}
#paraThird{
font-family: VALORANT;
font-size: 30px;
width: 14%;
}
#paraThird:hover{
color: rgba(216, 108, 108, 0.932);
cursor: default;
}
.maps{
position: relative;
top: 780px;
float: right;
width: 40%;
}
#paraFour{
font-family: VALORANT;
font-size: 30px;
width: 14%;
}
#paraFour:hover{
color: rgba(216, 108, 108, 0.932);
cursor: default;
}
.shootingRange{
position: relative;
top: 850px;
float: left;
width: 40%;
}
#paraFifth{
font-family: VALORANT;
font-size: 30px;
width: 50%;
}
#paraFifth:hover{
color: rgba(216, 108, 108, 0.932);
cursor: default;
}
#media (min-aspect-ratio: 16/9){
#videoBG{
width: 100%;
height: auto;
}
}
#media (max-aspect-ratio: 16/9){
#videoBG{
width: auto;
height: 100%;
}
}
#media (max-width: 767px){
#videoBG{
display: none;
}
body {
background: url('valoClip.png');
background-size: cover;
}
}
#font-face {
font-family: 'VALORANT';
src: url(fonts/Valorant\ Font.ttf);
font-style: normal;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Valorant</title>
<link rel="stylesheet" href="Valorant.css">
</head>
<body>
<!--Navigation Bar here-->
<img src="images/Valorant.png">
<div class="topnav">
<img src="images/Valorant.png">
Home
Gameplay
About
Guides
</div>
<!--Title-->
<h1 id="webname">valoraNt</h1>
<div class="wrapper">
<video id="videoBG" poster="valoClip.png" autoplay muted loop>
<source src="valoClip.mp4" type="video/mp4">
</video>
</div>
<!--Gameplay here-->
<div class="whole">
<div class="gameplay">
<h3 id="paraFirst">GAMEPLAY</h3>
<p>
Valorant is an online <abbr title="First Person Shooter">FPS</abbr> game that defy the limits.
Blend your style and experience on a global, competitive stage. The game has 13 rounds to attack
and defend your side using sharp gunplay and tactical abilities. And, with one life per-round,
you'll need to think faster than your opponent if you want to survive. Take on foes across
Competitive and Unranked modes as well as Deathmatch and Spike Rush. There is also a Practice
mode or tool to help you manage your aim.
</p>
<p> Watch the trailer here</p>
</div>
<!--Agents here-->
<div class="agents">
<h3 id="paraSec">AGENTS</h3>
<p>
Valorant is a 5v5 tactical shooter where each player plays as a character called an "agent".
<br>
<br>
There are currently 15 agents in the game; Astra, Breach, Brimstone, Cypher, Jett, Killjoy,
Omen, Phoenix, Raze, Reyna, Sage, Skye, Sova, Viper, Yoru.
</p>
<p>
Each agent has four unique abilities (including ultimate).
<br>
<br>
So far, the agent abilities range from traditional utility from realistic shooter such as
flasbangs and smoke granades but also include magical or futuristic themed abilities like
conjuring walls and sonic arrows that act like a radar.
<br>
<br>
There are some agents that will be available for new accounts while other agents have to be
unlocked through progression or battle pass system.
</p>
</div>
<!--Guns here-->
<div class="guns">
<h3 id="paraThird">GUNS</h3>
<p>
Valorant has a buy phase at the beginning of each round. Every agent has access to the same
guns and shields in their shop.
<br>
<br>
There are currently 17 guns in valorant; Classic, Shorty, Frenzy, Ghost, Sheriff, Stinger,
Spectre, Bucky, Judge, Marshal, Operator, Ares, Odin, Bulldog, Guardian, Phantom, Vandal.
</p>
<p>
Every agent has a primary weapon slot (SMGs, Shotguns, Snipers, and Heavy Machine Guns),
a secondary sidearm slot, and a knife.
<br>
<br>
During the buy phase, players can sell their sidearm or primary, request a teammate to buy a gun
for them if they're low on funds, announce that they have extra funds to purchase for a teammate,
or tell them to save their money for the round.
</p>
<p>
Guns vary in terms of:
<ul>
<li>Primary and alt fire settings</li>
<li>Damage output (based on head/body/legs)</li>
<li>Magazine capacity</li>
<li>Recoil pattern</li>
<li>Ability to pierce through walls</li>
</ul>
</p>
</div>
<!--Maps here-->
<div class="maps">
<h3 id="paraFour">MAPS</h3>
<p>
So far there are 5 maps with one objective: planting or defending against a bomb called "spike".
<br>
<br>
The 5 playable maps are:
<ul>
<li>Bind</li>
<li>Haven</li>
<li>Split</li>
<li>Ascent</li>
<li>Icebox</li>
</ul>
</p>
<p>
Each map also has two ultimate orbs in neutral locations that teams can try to grab.
The orb grants one point the ulimate of the agent who picked it up.
<br>
<br>
Another general thing to note is that some walls and terrain can be fired through. As a rule
of thumb, anything that leaves a bullter hole can be penetrated.
</p>
</div>
<!--Shooting Range here-->
<div class="shootingRange">
<h5 id="paraFifth">SHOOTING RaNGE</h5>
<p>
The last existing map is dedicated to practicing and honing your skills. Here you can
change your agent and guns at anytime (you can even teset characters that you do not own yet).
<br>
<br>
At the shooting range, you can shoot at dummies that spawn at different speeds and settings such
as strafing.
<br>
<br>
There is also an area dedicated to shooting long-distance targets to test the effective range of
guns.
<br>
<br>
Lastly, you can also practice scenarios such as planting a spike and then defending against bots
to improve your composure and ability in clutch situations.
</p>
</div>
</div>
</body>
</html>
I think the name of every paragraphs overlaps the links in the navbar. Thanks for the help, much appreciated :>
You can achieve the same look with margins instead of relative position
I have added a few classes to your CSS .mt-250 which will only add 250px margin in top of element, .width-40 make the width of element 40% of parent, .left and .right will make the element float to left or float to right
and delete some redundant class .gameplay, .agents, .guns, .maps, .shootingRange and replace them with the newly created class
for example this line <div class="mt-250 width-40 right"></div> will mean that this div will have a 250px margin in top of it and has a width of 40% and will float to the right
also delete some redundant IDs #paraFirst, #paraSec, #paraThird, #paraFour, #paraFifth and it's :hover change all of them with a single new class called paraheader to make Constant look and feel with all paragraph headers
note that all the above changes eliminate redundancy in style at Paragraphs sections and reduces number of line from 88 line to 15 line only which lead to faster loading on real network
working markup
html,
body {
height: 163%;
}
body {
background: rgba(236, 232, 225, 255);
color: #333;
font-family: helvetica;
font-size: 15px;
line-height: .5cm;
margin: 0;
padding: 0;
}
/* links configuration here */
a {
text-decoration: none;
}
a:hover {
color: rgba(216, 108, 108, 0.932);
}
/* links configuration ends here */
.whole {
margin-left: 50px;
margin-right: 50px;
font-size: 15px;
}
#webname {
/* heading here */
margin-top: 17%;
margin-bottom: 17%;
text-align: center;
font-size: 150px;
font-family: VALORANT;
color: white;
}
#webname:hover {
color: rgba(216, 110, 110, 0.933);
cursor: default;
}
.topnav {
position: fixed;
overflow: hidden;
background-color: #333;
padding-top: 10px;
padding-bottom: 10px;
top: 0;
width: 100%;
}
.topnav a {
color: white;
padding-top: 15px;
padding-left: 25px;
padding-right: 5px;
float: left;
font-family: VALORANT;
font-size: 25px;
display: block;
}
.topnav a:hover {
color: rgba(216, 108, 108, 0.932);
}
.topnav img {
float: right;
padding-right: 15px;
}
#videoBG {
/* background vid */
position: absolute;
right: 0;
bottom: 30%;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
background-size: cover;
overflow: hidden;
}
/* Paragraphs starts here */
.mt-250 { margin-top: 250px}
.left {float: left}
.right { float: right}
.width-40 {width: 40%;}
.paraheader{
font-family: VALORANT;
font-size: 30px;
width: 38%;
}
.paraheader:hover {
color: rgba(216, 108, 108, 0.932);
cursor: default;
}
#media (min-aspect-ratio: 16/9) {
#videoBG {
width: 100%;
height: auto;
}
}
#media (max-aspect-ratio: 16/9) {
#videoBG {
width: auto;
height: 100%;
}
}
#media (max-width: 767px) {
#videoBG {
display: none;
}
body {
background: url('valoClip.png');
background-size: cover;
}
}
#font-face {
font-family: 'VALORANT';
src: url(fonts/Valorant\ Font.ttf);
font-style: normal;
}
<!--Navigation Bar here-->
<img src="images/Valorant.png">
<div class="topnav">
<img src="images/Valorant.png">
Home
Gameplay
About
Guides
</div>
<!--Title-->
<h1 id="webname">valoraNt</h1>
<div class="wrapper">
<video id="videoBG" poster="valoClip.png" autoplay muted loop>
<source src="valoClip.mp4" type="video/mp4">
</video>
</div>
<!--Gameplay here-->
<div class="whole">
<div class="left width-40">
<h3 class="paraheader">GAMEPLAY</h3>
<p>
Valorant is an online <abbr title="First Person Shooter">FPS</abbr> game that defy the limits. Blend your style and experience on a global, competitive stage. The game has 13 rounds to attack and defend your side using sharp gunplay and tactical
abilities. And, with one life per-round, you'll need to think faster than your opponent if you want to survive. Take on foes across Competitive and Unranked modes as well as Deathmatch and Spike Rush. There is also a Practice mode or tool to help
you manage your aim.
</p>
<p> Watch the trailer here</p>
</div>
<!--Agents here-->
<div class="right mt-250 width-40">
<h3 class="paraheader">AGENTS</h3>
<p>
Valorant is a 5v5 tactical shooter where each player plays as a character called an "agent".
<br>
<br> There are currently 15 agents in the game; Astra, Breach, Brimstone, Cypher, Jett, Killjoy, Omen, Phoenix, Raze, Reyna, Sage, Skye, Sova, Viper, Yoru.
</p>
<p>
Each agent has four unique abilities (including ultimate).
<br>
<br> So far, the agent abilities range from traditional utility from realistic shooter such as flasbangs and smoke granades but also include magical or futuristic themed abilities like conjuring walls and sonic arrows that act like a radar.
<br>
<br> There are some agents that will be available for new accounts while other agents have to be unlocked through progression or battle pass system.
</p>
</div>
<!--Guns here-->
<div class="left mt-250 width-40">
<h3 class="paraheader">GUNS</h3>
<p>
Valorant has a buy phase at the beginning of each round. Every agent has access to the same guns and shields in their shop.
<br>
<br> There are currently 17 guns in valorant; Classic, Shorty, Frenzy, Ghost, Sheriff, Stinger, Spectre, Bucky, Judge, Marshal, Operator, Ares, Odin, Bulldog, Guardian, Phantom, Vandal.
</p>
<p>
Every agent has a primary weapon slot (SMGs, Shotguns, Snipers, and Heavy Machine Guns), a secondary sidearm slot, and a knife.
<br>
<br> During the buy phase, players can sell their sidearm or primary, request a teammate to buy a gun for them if they're low on funds, announce that they have extra funds to purchase for a teammate, or tell them to save their money for the round.
</p>
<p>
Guns vary in terms of:
<ul>
<li>Primary and alt fire settings</li>
<li>Damage output (based on head/body/legs)</li>
<li>Magazine capacity</li>
<li>Recoil pattern</li>
<li>Ability to pierce through walls</li>
</ul>
</p>
</div>
<!--Maps here-->
<div class="right mt-250 width-40">
<h3 class="paraheader">MAPS</h3>
<p>
So far there are 5 maps with one objective: planting or defending against a bomb called "spike".
<br>
<br> The 5 playable maps are:
<ul>
<li>Bind</li>
<li>Haven</li>
<li>Split</li>
<li>Ascent</li>
<li>Icebox</li>
</ul>
</p>
<p>
Each map also has two ultimate orbs in neutral locations that teams can try to grab. The orb grants one point the ulimate of the agent who picked it up.
<br>
<br> Another general thing to note is that some walls and terrain can be fired through. As a rule of thumb, anything that leaves a bullter hole can be penetrated.
</p>
</div>
<!--Shooting Range here-->
<div class="left mt-250 width-40">
<h5 class="paraheader">SHOOTING RaNGE</h5>
<p>
The last existing map is dedicated to practicing and honing your skills. Here you can change your agent and guns at anytime (you can even teset characters that you do not own yet).
<br>
<br> At the shooting range, you can shoot at dummies that spawn at different speeds and settings such as strafing.
<br>
<br> There is also an area dedicated to shooting long-distance targets to test the effective range of guns.
<br>
<br> Lastly, you can also practice scenarios such as planting a spike and then defending against bots to improve your composure and ability in clutch situations.
</p>
</div>
</div>
If you add z-index: 1; to .topnav, your problem will be solved. Because, topnav falls under the other contents that comes after topnav such as text, anchor est.
The problem seemed to be with the z-index of the navbar. Add a z-index of 99999 to the topnav class like done below:
.topnav {
position: fixed;
overflow: hidden;
background-color: #333;
padding-top: 10px;
padding-bottom: 10px;
top: 0;
width: 100%;
z-index: 99999999;
}
that seemed to fix it for me! If it worked mark my anwser as solved and if not let me know!
I am completely positive that my code causes my title to be in the center of my textbox, however, it doesn't look like it is! Can someone check that my code is sound?
.container {
width: 95%;
margin: 0 auto;
}
.home-about-textbox {
background-color: #232323;
padding: 4em;
width: 100vw;
margin-left: -2.65%;
outline: 2px solid #00ff6c;
outline-offset: -2.5em;
color: #FFF;
}
.home-about-textbox h1 {
text-align: center;
color: #00ff6c;
}
<div class="container">
<section class="home-about">
<div class="home-about-textbox">
<h1>Who I am</h1>
<p>I'm a young website developer who focusses on primarily making websites that are proven to have a <strong>high conversion rate</strong> so that my clients can experience that feeling of <strong>ever increasing cash flow!</strong></p>
<p>I usually like to spend a lot of my freetime working on either: a client's website design, or my personal website design. I am never the 'second-best' when it comes to website design which is why I offer numerous <strong>free</strong> design revisions
upon submission!</p>
</div>
</section>
</div>
Image of the Textbox:
Removing width: 100vwfrom .home-about-textbox seems fixed problem, no?
.container {
width: 95%;
margin: 0 auto;
}
.home-about-textbox {
background-color: #232323;
padding: 4em;
margin-left: -2.65%;
outline: 2px solid #00ff6c;
outline-offset: -2.5em;
color: #FFF;
}
.home-about-textbox h1 {
text-align: center;
color: #00ff6c;
}
<div class="container">
<section class="home-about">
<div class="home-about-textbox">
<h1>Who I am</h1>
<p>I'm a young website developer who focusses on primarily making websites that are proven to have a <strong>high conversion rate</strong> so that my clients can experience that feeling of <strong>ever increasing cash flow!</strong></p>
<p>I usually like to spend a lot of my freetime working on either: a client's website design, or my personal website design. I am never the 'second-best' when it comes to website design which is why I offer numerous <strong>free</strong> design revisions
upon submission!</p>
</div>
</section>
</div>
Why not write the <p> or <div> inside a <center> tag. It causes anything to be centered. In order to avoid further problems isolote the element to be centered from other elements.
I have the following issue involving the placement of text around an image using CSS and HTML. The way I've written it works as long as the text doesn't pass the image. The problem is that as soon as it "overflows" beyond the bottom of the image, it justifies all the way left and looks really sloppy.
How can I keep the text below the bottom of the image aligned with the previous text?
Note: I had to remove my original photo to prevent sharing personal information, and the replacement photo ended up being a little bit taller, so I had to copy and paste the text a few times to make it long enough to show what I'm talking about.
Here's the jsfiddle example including all my code: https://jsfiddle.net/dLa9jgcm/2/
.photo {
float: left;
height: 200px;
width: 200px;
margin-right: 20px;
overflow: hidden;
}
.photo img {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
width: 100%;
}
.info {}
.info h2,
#header h2 {
text-transform: uppercase;
letter-spacing: 2px;
margin-bottom: .3em;
}
.info h4,
#header h4 {
color: #999;
}
<div id="tab-data-wrap">
<!-- About Tab Data -->
<div id="about">
<section class="clearfix">
<div class="g2">
<div class="photo">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Olympic_rings_without_rims.svg/342px-Olympic_rings_without_rims.svg.png" alt="Olympic Rings">
</div>
<div class="info">
<h2>
Zeus
</h2>
<h4>
Associate Financial Advisor
</h4>
<p>Providing expert advice and guidance on investments and retirement planning in conjunction with high level service to individuals and families so that they have the peace-of-mind to pursue other important endeavors throughout their lives. Providing
expert advice and guidance on investments and retirement planning in conjunction with high level service to individuals and families so that they have the peace-of-mind to pursue other important endeavors throughout their lives. Providing
expert advice and guidance on investments and retirement planning in conjunction with high level service to individuals and families so that they have the peace-of-mind to pursue other important endeavors throughout their lives.</p>
<br> I am a Certified Financial Planner (CFP®).
</div>
Here u go JSFiddle link
.info{
float: left;
width: calc(100% - 220px);/*value should be equal to width of image along with margin*/
}
All you need to add is:
.g2 {
display: flex;
}
.photo {
min-width: 25%;
}
.photo{
float: left;
height: 200px;
width: 200px;
margin-right: 20px;
overflow: hidden;
}
.photo img{
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
width: 100%;
}
.info{
}
.info h2, #header h2{
text-transform: uppercase;
letter-spacing: 2px;
margin-bottom: .3em;
}
.info h4, #header h4{
color: #999;
}
.g2 {display: flex;}
.photo {
min-width: 25%;
}
<div id="tab-data-wrap">
<!-- About Tab Data -->
<div id="about">
<section class="clearfix">
<div class="g2">
<div class="photo">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Olympic_rings_without_rims.svg/342px-Olympic_rings_without_rims.svg.png" alt="Olympic Rings">
</div>
<div class="info">
<h2>
Zeus
</h2>
<h4>
Associate Financial Advisor
</h4>
<p>Providing expert advice and guidance on investments and retirement planning in conjunction with high level service to individuals and families so that they have the peace-of-mind to pursue other important endeavors throughout their lives. Providing expert advice and guidance on investments and retirement planning in conjunction with high level service to individuals and families so that they have the peace-of-mind to pursue other important endeavors throughout their lives. Providing expert advice and guidance on investments and retirement planning in conjunction with high level service to individuals and families so that they have the peace-of-mind to pursue other important endeavors throughout their lives.</p>
<br> I am a Certified Financial Planner (CFP®).
</div>
See it here (SO snippets seems down): https://jsfiddle.net/websiter/9d40ap7c/
Feel free to provide the image min-width in any unit you want if you want it fixed size.
I am trying to make an about page, I have text at the top and I want to have two images next to each other at the bottom, the problem I keep having is I can't figure out how to get them next to each other, they are at the bottom but they are on top of each other. I want them to be equal size both taking up 50% of the width of the Div box. I am a beginner at HTML and this is my first big project.
Here is my code
h1 {
color: white;
font-size: 50px;
font-family: ultra;
}
p {
color: white;
}
h2 {
color: white;
}
body {
font-family: "Lato", sans-serif;
}
.sidenav {
height: 100%;
width: 250px;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: red;
overflow-x: hidden;
padding-top: 60px;
}
.sidenav a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: black;
display: block;
}
.sidenav a:hover {
color: #818181;
}
.main {
margin-left: 250px;
font-size: 28px;
}
#media screen and (max-height: 450px) {
.sidenav {
padding-top: 15px;
}
.sidenav a {
font-size: 18px;
}
}
body {
background-color: #252525;
background-attachment: fixed;
background-position: 50% 50%;
background-repeat: no-repeat;
margin: 0;
}
.header {
background-color: #252525;
padding: 10px;
margin-left: 250px;
text-align: center;
}
.rcorners1 {
margin: auto;
border-radius: 25px;
background: #fffafa;
padding: 20px;
width: 90%;
height: ;
}
img.img-1 {
float: left;
}
img.img-2 {
float: right;
}
.article {
display: inline-block;
width: 60%;
}
img {
margin-right: 10px;
width: 100%;
height: 50%;
}
.clear {
clear: both;
}
<div class="sidenav">
Home
About
Why Us?
Meet The Team
Gear
Services
Products
Reviews
Location
Contact Us
</div>
<div class="header">
<h1>GEAR</h1>
</div>
<div>
<div class="main">
<div class="rcorners1">
<div>Parapsychologists Peter Venkman, Raymond Stantz, and Egon Spengler were scientists working for Columbia University. After being called to the New York Public Library to investigate the recent paranormal activity, they encounterd a full-fledged ghost
but she frightend them away. They lost their jobs at the university after that, so the trio established the Ghostbusters, a paranormal investigation and elimination service. They developed high-tech equipment to capture ghosts and they opened
their business in a disused, run-down firehouse. In their first outing, Egon warns them never to cross the energy streams of their proton pack weapons, as this could cause a catastrophic explosion, and they captured their first ghost, Slimer,
depositing it in a specially built containment unit in the firehouse basement. As the paranormal activity increased in New York City, they hired a fourth member, Winston Zeddemore, to cope with demand.</div>
<div>The Ghostbusters were then called by cellist Dana Barrett, whose apartment was haunted by a demonic spirit, Zuul, a demigod worshipped as a servant to Gozer the Gozerian, a shape-shifting god of destruction and chaos. As the Ghostbusters investigated,
Dana was possessed by Zuul, which declared itself the "Gatekeeper", and Louis was also possessed by a similar demon, Vinz Clortho, the "Keymaster". Both demons speaked of the coming of the destructive Gozer and the release of the imprisoned ghosts.
The Ghostbusters took steps to keep the two apart.</div>
Walter Peck, a lawyer representing the Environmental Protection Agency, had the Ghostbusters arrested for operating as unlicensed waste handlers and he orderd their ghost containment system deactivated, causing the explosion that released the ghosts and
Louis/Vinz. The ghosts wreaked havoc throughout the city while Louis/Vinz advanced toward Dana/Zuul's apartment. After consulting blueprints of Dana's apartment building, the Ghostbusters learned that mad doctor and cult leader Ivo Shandor, declared
humanity too sick to deserve existing after World War I, designed the building as a gateway to summon Gozer and bring about the end of the world.
<div>The Ghostbusters were released from custody to combat the supernatural crisis. On the apartment building roof, Zuul and Vinz opened the gate between dimensions and they transformed into supernatural hellhounds. Gozer, in the form of a woman, is
subdued by the team, disappearing entirely, as her voice echoes that the "destructor" will follow, taking a form chosen by the team; Ray inadvertently recalls a beloved corporate mascot from his childhood "something that could never, ever possibly
destroy us" and the destructor arrived in the form of a giant Stay Puft Marshmallow Man that attacked the city. The Ghostbusters crossed their proton pack energy streams and fire them at Gozer's portal; the explosion closed the gate, destroys
Stay Puft/Gozer, and frees Dana and Louis. The Ghostbusters were welcomed on the street as heroes. After these events we changed our company name to Bust A Ghost and we continued to work catching ghosts, and we still are today. Also these events
were made in a documentry about us ca
</div>
<div class="article">
<img src="Our Gadgets.jpg" class="img-1" alt="" /></div>
<div class="article">
<img src="Trap.jpg" class="img-2" alt="" /></div>
</div>
<div class="clear"></div>
</div>
</div>
You are having this issue because you assigned width: 60% to each div and that makes more than 100% for both together. You have to make them 50% and instead of display:inline-block, make them float:left followed with a clear:both. Try this code.
<div class="article">
<img src="Our Gadgets.jpg" class="img-1" alt=""/></div>
<div class="article">
<img src="Trap.jpg" class="img-2" alt=""/>
</div>
<div class="clear"></div>
.article {
float:left;
width: 50%;
height: 100px;
overflow: hidden;
}
img {
width: 100%;
height: 50%;
}
Use
.article{
width: 50%;
float: left;
}
For instance, you can't have white spaces in image source (src="Our Gadgets.jpg"). User slash or underline instead.
HTML
<div class="images">
<img src="http://www.modafinilsale.com/data/out/789/231770955-random-desktop-wallpaper.jpg" alt="">
<img src="http://www.modafinilsale.com/data/out/789/231770955-random-desktop-wallpaper.jpg" alt="">
</div>
CSS
.images img {
display: block;
width: 50%;
float: left;
}
For some reason text1 goes to the next column instead of under the image like it should unless i use a clear tag. The problem with using a clear tag is i cannot add text2 around where text1 was previously before the clear tag which is why you see a big space before the paragraphs.
Also text-align doesn't center text on the page. It centers text around its contents. How do i fix this?
Jsfiddle - https://jsfiddle.net/p6eocccj/
HTML
<div id="div1">
<p id="text0"><span id="sp1pg4">About me</span></p>
<img id="img1" src ="images/hack.jpg"/>
<br>
<p id="text1"><strong>Image Courtesy Homer Simpson</strong><br></br>
www.homersimpsoniscooltoo.com</p>
<p id="text2">
Hi there!
<br></br>
I'm bob, a coool designer and developer<br>
from Far far coolioland, Australia. I<br>
specialise in cooking, shipping, shopping,<br>
camping and turning coffee into popcorn. My<br>
approach to buytying is this, make it clean and<br>
simple but also focus on the buying for men. This<br>
is what differentiates poor people from great chimps.<br>
Whether you want to build a house for as long as<br>
business, a personal toy or just ask you some<br>
</p>
</div>
CSS
#div1 {
width: max-width;
height: 1650px;
background-color: #ECECEC;
}
#text0 {
text-align: left;
padding-top: 25px;
padding-left:150px;
}
#img1 {
float:left;
margin-top: 25px;
margin-left:150px;
width: 220px;
height: 220px;
border-radius: 50%;
}
#text1 {
clear:left;
float:left;
padding-left:160px;
font-size:13px;
line-height:80%;
}
#text2 {
padding-top: 100px;
line-height: 140%;
text-align: center;
font-family: sans-serif;
font-size: 15px;
}
Because when you apply float rule to any element then that element is not part of Normal Document Flow and it will wrap texts around it. Either remove float or use clearfix hack.
Here is clearfix hack-
.clearfix::after {
display: table;
content: '';
clear: both;
}
P.S: I have just removed float: left from image. If you want to use hack then apply clearfix class to parent of image.
#div1 {
width: max-width;
height: 1650px;
background-color: #ECECEC;
}
#text0 {
text-align: left;
padding-top: 25px;
padding-left:150px;
}
#img1 {
margin-top: 25px;
margin-left:150px;
width: 220px;
height: 220px;
border-radius: 50%;
}
#text1 {
clear:left;
float:left;
padding-left:160px;
font-size:13px;
line-height:80%;
}
#text2 {
padding-top: 100px;
line-height: 140%;
text-align: center;
font-family: sans-serif;
font-size: 15px;
}
<div id="div1">
<p id="text0"><span id="sp1pg4">About me</span></p>
<img id="img1" src ="images/hack.jpg"/>
<br>
<p id="text1"><strong>Image Courtesy Homer Simpson</strong><br></br>
www.homersimpsoniscooltoo.com</p>
<p id="text2">
Hi there!
<br></br>
I'm bob, a coool designer and developer<br>
from Far far coolioland, Australia. I<br>
specialise in cooking, shipping, shopping,<br>
camping and turning coffee into popcorn. My<br>
approach to buytying is this, make it clean and<br>
simple but also focus on the buying for men. This<br>
is what differentiates poor people from great chimps.<br>
Whether you want to build a house for as long as<br>
business, a personal toy or just ask you some<br>
</p>
</div>
Because you add float left to to image tag..remove float on image or add clear to text elements