How to not push other elements away when increasing margin on the same line - html

How to not push other elements away when increasing margin on the same line. I have <a> elements and a button element. When I try to increase the left-margin of button, the <a> margin gets pushed away. I just want the button to go to the right of the page. Tried using float but I don't want it to go to the extreme left (leave some space).
a {
font-family: Arial;
font-size: 12px;
align-items: center;
margin-right: 50px;
color: black;
text-decoration: none;
}
nav {
margin-top: 30px;
}
.chat {
width: 100px;
height: 35px;
background-color: white;
border-style: solid;
border-color: black;
border-width: 1px;
font-family: Arial;
font-weight: 600;
cursor: pointer;
margin-left: 0px;
}
<nav>
<div class="navbar" align='center'>
Home
Works
About
Projects
<button class='chat'>Let's chat</button>
</div>
</nav>

I just want the button to go to the right of the page.
Use flex-box. Wrap your links inside a container and set display of it's parent element to flex and remove the width property of the button.
a {
font-family: Arial;
font-size: 12px;
align-items: center;
margin-right: 50px;
color: black;
text-decoration: none;
}
nav {
margin-top: 30px;
}
.chat {
height: 35px;
background-color: white;
border-style: solid;
border-color: black;
border-width: 1px;
font-family: Arial;
font-weight: 600;
cursor: pointer;
}
.navbar {
display: flex;
justify-content: space-around;
align-items: center;
}
<nav>
<div class="navbar" align='center'>
<div class="links">
Home
Works
About
Projects
</div>
<button class='chat'>Let's chat</button>
</div>
</nav>

If you want to use float you need to set a width on nav and then float button right and navbar float left.
a {
font-family: Arial;
font-size: 12px;
align-items: center;
margin-right: 50px;
color: black;
text-decoration: none;
}
nav {
margin-top: 30px;
width: 600px;
}
.navbar{
float:left;
}
.chat {
width: 100px;
height: 35px;
background-color: white;
border-style: solid;
border-color: black;
border-width: 1px;
font-family: Arial;
font-weight: 600;
cursor: pointer;
margin-left: 0px;
float:right;
}
<nav>
<div class="navbar" align='center'>
Home
Works
About
Projects
</div>
<button class='chat'>Let's chat</button>
</nav>

Related

Trying to make div move to another div

So I am trying to make it look like this
However, it currently looks like this
As, you can see the top section with the logo and register have their own section. I want it to stay on top of the background image. I do not want to use position: absolute; or position : fixed; since i want it to say in its own section. I have also tried using a negative margin and it does not work. Any help is appreciated.
.top-firstsection {
display: flex;
}
.logo-header {
height: 80px;
}
.nav-list {
margin-left: auto;
list-style: none;
display: flex;
}
.leftandright {
display: flex;
justify-content: space-between;
}
.login {
font-family: Helvetica;
font-size: 13px;
color: #000000;
letter-spacing: 0.98px;
text-align: center;
text-decoration: none;
line-height: 26px;
cursor: pointer;
}
.register {
font-family: Helvetica;
font-size: 13px;
color: #0972D7;
letter-spacing: 0.98px;
text-align: center;
text-decoration: none;
line-height: 26px;
}
.first-left {
padding-top: 220px;
padding-left: 171px;
}
.first-left h1 {
font-family: Poppins-Regular;
font-size: 40px;
color: #000000;
letter-spacing: 0;
line-height: 50px;
}
.sectionOne-textbox {
border: 1px solid #EBEBEB;
border-radius: 4px;
font-family: Helvetica;
font-size: 14px;
color: #000000;
letter-spacing: 1.05px;
line-height: 52px;
width: 80%;
}
.sectionOne-button {
background: #1F8FFB;
border-radius: 4px;
border: 1px solid;
padding: 16px 25px;
font-family: Helvetica;
font-size: 13px;
color: #FFFFFF;
letter-spacing: 1.3px;
text-align: center;
margin-top: 24px;
}
<section class="first-section">
<div class="top-firstsection">
<img src="logo.svg" alt="logo" class="logo-header">
<ul class="nav-list flex">
<li>
LOGIN
</li>
<li>
REGISTER
</li>
</ul>
</div>
<div class="leftandright">
<div class="first-left">
<h1>Open marketplace <br> for ordering & purhasing <br> scientific experiments</h1>
<input type="text" id="" class="sectionOne-textbox" placeholder="Discover new experiments...">
<button class="sectionOne-button">GET STARTED NOW!</button>
</div>
<div class="first-right">
<img src="firstsectionbackground.png" alt="main graphic" class="main-graphic">
</div>
</div>
</section>

HTML buttons do not display properly next to list items

I'm building the traditional todo list app in an effort to increase my understanding of Vuejs. Most of the functionality is working as expected, however my todo items are not displaying properly. Each item should have a "delete" button that shows up on the right side of its row, but the buttons are bleeding into the row below (see image).
What irks me is that the checkboxes are displaying properly, but the buttons are not. I've tried changing all the css for the buttons to that for the checkbox, but this didn't work
TodoItem.vue
<template lang="html">
<li class="todo-item" v-bind:class="{ 'is-complete': todo.completed }">
<div class="checkbox-holder">
<input type="checkbox" v-on:change="markComplete(todo.id)" />
</div>
<h2>{{ todo.title }}</h2>
<button v-on:click="deleteTodo(todo.id)" class="del">x</button>
</li>
</template>
App.scss
.todos {
position: absolute;
display: block;
width: 656px;
background-color: white;
margin-left: 266px;
border-right: $generic-border;
min-height: calc(100vh);
padding-left: 40px;
padding-right: 40px;
padding-top: 80px;
padding-bottom: 80px;
#include mq("900px") {
margin-left: 0;
width: auto;
}
h2 {
font-size: 20px;
font-weight: normal;
}
&__list li {
line-height: 1.4;
color: #333;
font-size: 14px;
list-style-type: none;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 20px;
margin-top: 20px;
padding: 20px;
&.is-complete {
text-decoration: line-through;
}
button {
#include btn("30px");
float: right;
display: block;
}
.checkbox-holder {
margin-right: 20px;
margin-left: 20px;
align-items: center;
justify-content: center;
line-height: 16px;
float: left;
.checkbox {
cursor: pointer;
border-color: gray;
color: #343434;
height: 16px;
width: 16px;
border: 1px solid gray;
border-radius: 16px;
}
}
}
}
Here's how the buttons are displaying.
You can see the below code.
li {
display: flex;
align-items: center;
}
<ul>
<li class="todo-item">
<div class="checkbox-holder">
<input type="checkbox"/>
</div>
<h2>Hello world</h2>
<button>x</button>
</li>
</ul>

Using CSS, how do I properly align and maintain layout of HTML elements on resize?

In the following HTML/CSS snippet, I'm trying to align the output div below the input field in such a way that they have the same width whenever the window is resized.
Right now the elements get misaligned whenever the viewport dimensions are changed.
How do i refactor and improve my CSS to achieve the desired result?.
I am still very fairly new to web design and development in general and would appreciate it if i could get detailed answers and suggestions. Thanks.
CSS/HTML
html {
font-size: 62.5%;
}
body {
background-color: #c0c0c0;
font-size: 1.6rem;
}
.section {
position: relative;
margin-top: 2rem;
text-align: center;
}
header {
margin-bottom: -2rem;
}
.text-field {
display: inline-block;
background-color: #c0c0c2;
border-top: .4rem solid;
border-color: red;
border-radius: .3rem;
color: black;
width: 50%;
height: 4.2rem;
text-align: left;
text-decoration: none;
font-size: 1.5rem;
min-width: 17.5rem;
}
.btn {
display: inline-block;
background-color: blue;
border-color: black;
border-radius: 3px;
border-style: dotted;
color: white;
padding: 14px 20px;
text-align: center;
text-decoration: none;
font-size: 16px;
}
.output-div {
position: absolute;
display: block;
font-size: 1.4rem;
background-color: #fff;
border-top: .5rem solid;
border-right: .15rem solid;
border-bottom: .15rem solid;
border-left: .15rem solid;
border-color: clack;
border-radius: .3rem;
margin: .5rem auto auto 6.5rem;
min-width: 17.4rem;
padding: .1em;
width: 50%;
height: auto;
text-align: left;
overflow-wrap: break-word;
word-wrap: break-word;
}
<br>
<!-- ✓ Oguntoye -->
<section class="section">
<header>
<h1>Header</h1>
</header>
<div class="user-interaction-area">
<form id="form">
<input class="text-field" type="text" placeholder="Input">
<button class="btn" type="button">Run</button>
</form>
</div>
<!-- output block-->
<div class="output-div">
<kbd class="input-output">Oy</kbd>
<samp class="run-output">vey!</samp>
</div>
</section>
I put your example code inside a codepen. https://codepen.io/melvinhicklin/pen/qyRwXB?editors=1100
From what I could see, the text areas already do a good job of staying the same width.
To align them, I added the following to the .output-div CSS Class:
position:relative;
left:-71px;
display:inline-block;

Getting nested divs inline and level with each other

Essentially I have several divs and I'm trying to align them so that they stay in line with each other regardless of the size of the window. I have a dropdown bar (testRegion) and I have a large textarea where users can input SSNS (SSNinput). Much of the rest of the page, on the righthand should be a table that displays the results.
I apologize, I don't have access to it at the moment, so I can't really show you how I'd like it to look, even with a screenshot. But essentially the height of testRegion, SSNinput, and the buttons below, should equal the height of the table on the righthand side. The table is being created successfully at the bottom of the code here. (maintbl).
<div class="pageContent row col-lg-12" style="white-space:nowrap; width:1200px;" >
<div class="col-lg-2" style="width: 245px; display:inline-block; white-space:nowrap;">
<div class="row" style="white-space:nowrap; display:inline-block; width:245px;">
<select class=" btn btn-default dropdown-toggle" id="testRegion" data-toggle="dropdown" style="width:235px">
<option value="a">Acceptance</option>
<option value="i">Integration</option>
</select>
</div>
<div class="row" style="padding-top: 8px; border: dotted; white-space:nowrap; width:245px;">
<textarea id="SSNinput" rows="21" class="form-control" placeholder="Paste/Import SSNS Here" style="width: 235px; display: inline-block;"></textarea>
</div>
<div id="navbuttons" style="float: left; white-space: nowrap; padding-top: 10px; width:245px;">
<button id="Validate" title="Validate" class="glyphicon glyphicon-play" onclick="getParticipantPlans();"></button>
<button id="Import" title="Import" class="glyphicon glyphicon-log-in"></button>
<button id="Export" title="Export" class="glyphicon glyphicon-log-out" onclick="ExportToExcel();"></button>
<button id="Clear" title="Clear" class="glyphicon glyphicon-repeat" onclick="ClearArea();"></button>
</div>
</div>
<div id='jqxWidget' class ="col-lg-8" style="font-size: 13px; font-family: Verdana; display: inline-block; width:800px; ">
<div id="maintbl"></div> <!--table created here successfully.-->
</div>
</div>
I'm sorry I can't provide a better description for you all. Essentially the behavior now, is that the SSNinput and testRegion divs get all out of whack and not level with the table. I've tried a bunch of container divs, and setting whitespace to nowrap. Nothing seems to work. Any guidance here would be appreciated. Thanks.
EDIT
Here's the attached CSS I'm using.
#nav {
padding-right: 10px;
resize: none;
max-width: 230px;
min-width: 230px;
float: left;
}
#thead {
color: white;
background-color: #0c98cf;
font-family: Arial;
width: 100%;
text-align: center;
border-radius: 10px;
}
#maintbl td {
text-align: center;
}
#title-wrapper {
background-color: #086387;
}
#import {
cursor: pointer;
font-size: 1.9em;
background-color: #0c98cf;
padding-top: 10px;
padding-bottom: 10px;
border-radius: 6px;
padding-left: 12px;
color: white;
}
#clear {
cursor: pointer;
font-size: 1.9em;
background-color: #0c98cf;
padding-top: 10px;
padding-bottom: 10px;
border-radius: 6px;
padding-left: 12px;
color: white;
text-align: center;
}
#export {
cursor: pointer;
font-size: 1.9em;
background-color: #0c98cf;
border-radius: 6px;
padding-left: 12px;
padding-top: 10px;
padding-bottom: 10px;
color: white;
}
#validate {
cursor: pointer;
font-size: 1.9em;
background-color: #0c98cf;
padding-top: 10px;
padding-bottom: 10px;
border-radius: 6px;
color: white;
}
#validate:hover {
color: white;
background-color: #808080;
}
#export:hover {
color: white;
background-color: #808080;
}
#import:hover {
color: white;
background-color: #808080;
}
#clear:hover {
color: white;
background-color: #808080;
}
#SSNinput {
resize: none;
border-radius: 0px;
overflow-y: auto;
display: inline-block;
border-radius: 9px;
}
/*drop area for importing in popup window*/
#drop {
border: 2px dashed #bbb;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
padding: 25px;
text-align: center;
font: 15pt bold, "Vollkorn";
color: #bbb;
}

Image border issue

HTML
<body>
<div class="header">
<div class="header-logo"><u>MMH</u></div>
<div class="header-inner">Miami Max Hydro</div>
<nav class="header-nav">
About
Contact
</nav>
</div>
<div class="homepage">
<div class="content">
<div class="images">
<div class="column">
<div class="profile-large">
<div class="column1">
<div class="profile-overlay">
<div class="column1">
<img src=data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMTEhUTExMVExIVGBYYFRcVFhcVFxUVFxUYFxUVFRUYHSggGB0lGxUVITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGBAQFysdHR0rLS0rKy0tLSstKysrKy0tLSsrLS0tLS0tNy0tLS0tNystNysrLS03KystKy0tKysrK//AABEIAJABAAMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAFAgMEBgcBAAj/xABBEAABAwIDBQUFBgQEBwEAAAABAAIDESEEBTESQVFhcQYTIoGhMpGxwdEHFEJS4fBTYnKSFiOCshckM2PC0vEV/8QAGQEAAwEBAQAAAAAAAAAAAAAAAQIDAAQF/8QAJREAAwEAAQMEAgMBAAAAAAAAAAECESEDEjEEE0FRIjJCYXEF/9oADAMBAAIRAxEAPwDSyEy5t1Ik1TUiuzmXkYJTdUp+qSEg6OtYvPdYrxKTKFgkZjUpwXmrsjqKNlJIGKfuTMh8DuiTiH1KTM6jD0UWW3gB97dO/eNOf1UDaulk12U5MtfZLFATedB51RHtRiSJyK0o0H0VTyWYh4INDttoTuNUX7VzO7522AHBgrS4JpqOqp/EVL8hzC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ZRIWhw2SCK2cOf0W9mH8G72exuLD3udxNbqD/8ApUcKNBod/wAFNxOX92CJNoVFW7FHV3Gt0HMLrihtfTcrTwsEfPkLRTbYLqAX3aJpxuuZXgJXMkka0ujjFZDoAD80l7hu0WVCtFryWEiFtN9TREGTlp4K1NyaJuGhsQ7YZcbyWgkrmNwDHNFdRbqOa565ZTwf/9k= />
<div class="column2">
<p>Cell2</p>
</div>
<div class="column3">
<p>Cell3</p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
CSS:
body {
background-image: url(http://weknowyourdreamz.com/images/sea/sea-08.jpg);
background-size: cover;
font-family: 'Century Gothic', CenturyGothic, AppleGothic, sans-serif;
back
}
.header {
text-align: center;
padding: 10px;
background: #D2F0C6;
overflow: auto;
position: fixed;
top: 1px;
right: 1px;
left: 1px;
border: 6px solid #80bc80;
}
.header-inner {
Margin-top: 10px;
}
.images {
padding: 20px;
}
.header-inner a {
text-decoration: none;
color: #000000;
font-size: 24px;
font-weight: bold;
line-height: 20px;
}
.header-logo {
font-size: 32px;
Font-weight: bold;
line-height: 28px;
}
.header-logo a {
text-decoration: none;
color: #000000;
}
.header-nav a {
text-decoration: none;
color: #295f6f;
margin-right: 5px;
margin-left: 5px;
line-height: 25px;
font-weight: bold;
}
.header-nav {
margin-right: 5px;
margin-left: 5px;
}
..images {
padding: 20px 0;
}
.column {
width: 33%;
height: 33%;
font-weight: bold;
line-height: 30;
float: left;
text-align: center;
}
.profile-overlay {
float: left;
border: 6px solid #80bc80;
width: 255px;
height: 245px;
}
My Issue:
Basically, No matter what I do to get a border around my image, I get
Basically the top border extends behind the header.
I've tried margin-top with no success, it just keeps the picture in the same spot relative to the border while pushing the top of the border down.
line-height won't work either. Even line-height 1 will instantly make the picture match the top border but go away from the bottom and hide under the header.
I do have an idea in mind, doing line-height 1 then doing some command to move the whole border/picture down relative to the body, but I don't know any code that does that.
JSFiddle.
Remove border: 6px solid #80bc80; for .profile-overlay and add it to .column1 img.
.column1 img {
border: 6px solid #80bc80;
}