How can I bring two content boxes together on the same line? - html

at the moment I have two content boxes which are placed on seperate lines and they are not connected. If possible, I would like to bring these two boxes to be the same on the same line as one another and then add padding to the sides of these boxes. An example has been shown in the image below of what I have currently and what I would like to have.
My code is as follows:
HTML -
<h1 id="LogInHeader">LOGIN</h1>
<div class="form-group">
<input type="text" id="txtGRC" placeholder="Email Address">
<input type="text" id="txtGRC" placeholder="Password">
</div>
<button type="submit" id="GenerateReportButton" class="btn btn-default">SECURE LOGIN</button>
<p id="LogInForgottenPassword" style="color:white">Forgotten Password</p>
</form>
</content>
<div id="carousel-example" class="carousel slide" data-ride="carousel">
<!-- Wrapper for slides -->
<div class="row">
<div class="col-xs-offset-3 col-xs-6">
<div class="carousel-inner">
<div class="item active">
<div class="carousel-content">
<div>
<img src="Content/Images/Carousel/Microscope.png" />
<h2 id="CarouselHeader">REAL-TIME REPORTING ON YOUR RECOVERY AUDIT</h2>
<p id="CarouselText">Our secure client area lets you view and generate reports of the auditing process in progress </p>
<p id="CarouselLink">Find out more ></p>
</div>
</div>
</div>
<div class="item">
<div class="carousel-content">
<div>
<img src="Content/Images/Carousel/Headache%20pill.png" />
<h2 id="CarouselHeader">FAST, QUICK ACTION</h2>
<p id="CarouselText">Sick of losing proft? Auditing given you a headache? Let us take care of that for you </p>
<p id="CarouselLink">Find out more ></p>
</div>
</div>
</div>
<div class="item">
<div class="carousel-content">
<div>
<img src="Content/Images/Carousel/Trolleys.png" />
<h2 id="CarouselHeader">PRIVATE, PUBLIC, WE DO IT ALL</h2>
<p id="CarouselText">Worried that we don't cover your business? We cover a wide ranges from private to public </p>
<p id="CarouselLink">Find out more ></p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Controls --> <a href="#carousel-example" data-slide="prev">
</a>
<a href="#carousel-example" data-slide="next">
</a>
</div>
CSS -
.carousel-content {
color:black;
display:flex;
align-items:center;
text-align: center;
}
#carousel-example{
width: 500px;
height: 200px;
}
#CarouselHeader{
font-weight: bold;
font-size: 18px;
}
#CarouselText{
font-size: 11px;
color: #6d6e70;
}
#CarouselLink{
font-size: 12px;
text-decoration: underline;
}
#CarouselLink a:link{
color: #4f7f64;
}
#LogInForgottenPassword{
color: white;
font-size: 11px;
text-decoration: underline;
padding-bottom: 25px;
}
#LogInHeader{
color: white;
font-weight: bold;
font-size: 22px;
padding-top: 40px;
}
#LogInMain {
border-color: red;
border-radius: 25px;
color: white;
}

Use display and give it the setting inline-block:
http://www.w3schools.com/cssref/pr_class_display.asp
It is also possible with the float property:
http://www.w3schools.com/cssref/pr_class_float.asp

As you are already using the display: flex option in your code, let's take that and use it.
.container {
display: flex;
}
.item {
height: 100px;
border: 1px solid #333;
flex: 1;
flex-direction: row;
/* flex-direction: row is the initial value */
}
<div class="container">
<div class="item">
Item 1
</div>
<div class="item">
Item 2
</div>
</div>

Use following
.inl{ border-width:thick;
border-style:dashed;
border-color:Black;
display:inline-block;
width:100px;
}
<div class="inl">abc
</div>
<div class="inl">abc
</div>
}

.carousel-inner { display: flex; justify-content: space-between; }
.carousel-inner .item { width: 25%; }
<div class="carousel-content">
<div>
<img src="Content/Images/Carousel/Microscope.png" />
<h2 id="CarouselHeader">REAL-TIME<div class="row">
<div class="col-xs-offset-3 col-xs-6">
<div class="carousel-inner">
<div class="item active">
<div class="carousel-content">
<div>
<img src="Content/Images/Carousel/Microscope.png" />
<h2 id="CarouselHeader">REAL-TIME REPORTING ON YOUR RECOVERY AUDIT</h2>
<p id="CarouselText">Our secure client area lets you view and generate reports of the auditing process in progress </p>
<p id="CarouselLink">Find out more ></p>
</div>
</div>
</div>
<div class="item">
<div class="carousel-content">
<div>
<img src="Content/Images/Carousel/Headache%20pill.png" />
<h2 id="CarouselHeader">FAST, QUICK ACTION</h2>
<p id="CarouselText">Sick of losing proft? Auditing given you a headache? Let us take care of that for you </p>
<p id="CarouselLink">Find out more ></p>
</div>
</div>
</div>
<div class="item">
<div class="carousel-content">
<div>
<img src="Content/Images/Carousel/Trolleys.png" />
<h2 id="CarouselHeader">PRIVATE, PUBLIC, WE DO IT ALL</h2>
<p id="CarouselText">Worried that we don't cover your business? We cover a wide ranges from private to public </p>
<p id="CarouselLink">Find out more ></p>
</div>
</div>
</div>
</div>
</div>
</div> REPORTING ON YOUR RECOVERY AUDIT</h2>
<p id="CarouselText">Our secure client area lets you view and generate reports of the auditing process in progress </p>
<p id="CarouselLink">Find out more ></p>
</div>
</div>

Related

How to rotate first element wit flexbox and make it full-height?

I try to implement this graphic with HTML, CSS using flexbox:
Now, I have trouble with the left part. I don't know how to implement this -90 degrees rotated element. The right part (all elements that are horizontally aligned) is not the problem.
Here is what I have so far:
.container {
max-width: 1176px;
width: 100%!important;
margin: 0 auto!important;
float: none!important;
z-index: 1;
}
.pt {
padding-top: 3.5rem;
/* 56px */
}
.pb {
padding-bottom: 3rem;
/* 48px */
}
.ptms {
padding-top: 1.5rem;
/* 24px */
}
.full-width {
width: 100%;
padding: 0 1.5rem;
}
.three-col {
width: 33.3333334%;
padding: 0 1.5rem;
}
.platform-container,
.platform-card-container {
display: flex;
}
.platform-card-container .three-col,
.platform-card-container .full-width {
padding: 0 .75rem;
}
.platform-card-container a {
text-decoration: none;
}
.platform-card,
.platform-card-first {
border-radius: .5rem;
box-shadow: 0 .25rem .75rem 0 rgba(27, 27, 27, 0.24);
display: flex;
height: 100%;
}
.platform-card {
align-items: center;
}
.platform-card-first {
}
.platform-card-icon {
padding: .75rem;
border-radius: 50%;
background-color: #f5f5f5;
width: 3.5rem;
height: 3.5rem;
min-width: 3.5rem;
}
.platform-card-text {
margin-left: 1rem;
}
.platform-card-text-title {
margin-bottom: .5rem;
color: #1b1b1b;
}
.platform-card-text-desc {
color: #007095;
}
<div class="container platform-container">
<div>
<div class="pt platform-card-container">
<div class="full-width">
<a href="">
<div class="platform-card-first">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-technology-3d-printing-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Open Architecture</h4>
<div class="platform-card-text-desc">Extend systems as required</div>
</div>
</div>
</a>
</div>
</div>
</div>
<div>
<div class="pt platform-card-container">
<div class="three-col">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-design-ruler-triangle-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">User Interface</h4>
<div class="platform-card-text-desc">Modern front-end technologies</div>
</div>
</div>
</a>
</div>
<div class="three-col">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-mobile-phone-location-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Intelligent Mobility</h4>
<div class="platform-card-text-desc">Mobile and offline access</div>
</div>
</div>
</a>
</div>
<div class="three-col">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-network-monitor-team-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Social Collaboration</h4>
<div class="platform-card-text-desc">Efficient teamwork</div>
</div>
</div>
</a>
</div>
</div>
<div class="ptms platform-card-container">
<div class="full-width">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-toys-lego-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Low-Code Suppport</h4>
<div class="platform-card-text-desc">Processes without programming</div>
</div>
</div>
</a>
</div>
</div>
<div class="ptms platform-card-container">
<div class="three-col">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-multimedia-shuffle-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Business Rule Engine</h4>
<div class="platform-card-text-desc">Intelligent decision making</div>
</div>
</div>
</a>
</div>
<div class="three-col">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-programming-module-puzzle-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Integration</h4>
<div class="platform-card-text-desc">Standard connectors and more</div>
</div>
</div>
</a>
</div>
<div class="three-col">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-transportation-road-sign-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Adaptive Case Management</h4>
<div class="platform-card-text-desc">Making processes flexible</div>
</div>
</div>
</a>
</div>
</div>
<div class="ptms platform-card-container">
<div class="full-width">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-interface-settings-cog-double-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Process Engine</h4>
<div class="platform-card-text-desc">Powerful process automation</div>
</div>
</div>
</a>
</div>
</div>
<div class="ptms platform-card-container">
<div class="full-width">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-work-presentation-projector-screen-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Modern Runtime Platform</h4>
<div class="platform-card-text-desc">Environment with container support</div>
</div>
</div>
</a>
</div>
</div>
</div>
Does anyone have a hint on how I should proceed?
I believe these styles are what you want:
text-align: right;
writing-mode: vertical-rl;
transform: rotate(180deg);
text-orientation: mixed;
https://jsfiddle.net/aycq2v8u/
edit: I noticed that the height still wasn't right. (BTW, display:grid makes this sort of thing easier). here's a revision with that fixed as well. although, this does require either ridiculous looking selectors or changes to the html, which I have done here: https://jsfiddle.net/rxgbo4a9/
changes required:
the card container of the first card (that needs to be full height) needs to be different. since it is on the side and generally different content, I marked it as an aside:
<aside class="pt platform-card-container">
then, with that, using minimal changes to your css we get the desired result:
aside.platform-card-container {
height:100%
}
aside.platform-card-container a {
display: flex;
height: 100%
}
note that specifying height instead of using flexbox is not ideal. however, since all your code makes the same mistake, I think you minimize technical debt to keep all the problems of the same type .. ie, keep using height until you are ready to remove it generally.

I have multiple blocks in design need to write the html code for that with the help divs

I am using this code to develop HTML code for the image below, but I am overlapping the divs, and stuck with code. I need to develop the solution with the help of divs in HTML.
<div style="width:80%; height: 80px;padding-right:110px;margin-right:40px">
<div style="width:26%; float: left;float:left">
<div class="pointer-blue-small1">Steps & User Requirements Definition</div>
</div>
<div style="width:15%; float: left;">
<div class="pointer-blue-small1">High Level Design</div>
</div>
</div>
<div style="background:rgb(93,188,210);width:500px;height:110px;color:white;line-height:1.2;padding:10px;margin: 5px;">
<div>
<div style="background:rgb(143,63,123);width:390px; height:40px;color:white;text-align:center;line-height:1.2;float:left;padding-left:50px;margin-left:100px">A1901 Integrated Planning</div>
</div>
<br />
<br />
<br />
<div>
<div class="pointer-purple-small" style="width:374px;height:40px;color:white;text-align:center;float:left;padding-left:50px;margin-left:100px;line-height:1.2;display:inline-block">A1102 Update Project Plan</div>
</div>
</div>
<div style="background:rgb(93,188,210);width:500px;height:60px;color:white;line-height:1.2;padding:10px;margin: 15px;display:inline-block;margin-left:6px">
<div style="background:rgb(143,63,123);width:390px; height:40px;color:white;text-align:center;line-height:1.2;float:left;padding-left:50px;margin-left:100px">A1919 Change Request Control & Monitor and Report Risks and Issues</div>
</div>
<div style="background:rgb(93,188,210);width:500px;height:175px; color:white;line-height:1.2;padding:10px;margin: 5px;" ;display: inline-block;margin-left:35px">
<div>
<div style="background:rgb(143,63,123);width:390px; height:40px;color:white;text-align:center;line-height:1.2;float:left;padding-left:50px;margin-left:100px">A1105 Quality Assurance </div>
</div>
<br />
<br />
<br />
<div>
<div style="background:rgb(143,63,123);width:390px;height:40px;color:white;text-align:center;float:left;padding-left:50px;margin-left:100px;line-height:1.2;display:inline-block">A1922 StackHolder Management</div>
</div>
<br />
<br />
<br />
<div>
<div class="pointer-purple-small" style="width:374px;height:40px;color:white;text-align:center;flo[![enter image description here][1]][1]at:left;padding-left:50px;margin-left:100px;line-height:1.2;display:inline-block">A1104 Update Quality Plan</div>
</div>
</div>
</div>
.left-parent div {
width: 40%;
height: 50px;
}
.row {
justify-content: space-between;
}
.left-parent {
justify-content: space-between;
}
.border {
border: 1px solid;
}
.flex {
display: flex
}
.left,
.right {
width: 50%;
margin: 10px
}
.child {
height: 50px;
margin-top: 20px;
}
<div class="row flex ">
<div class="left">
<div class="flex left-parent">
<div class="border left-parent-child">
</div>
<div class="border left-parent-child">
</div>
</div>
<div class="border child">
</div>
<div class="border child">
</div>
<div class="border child">
</div>
</div>
<div class="right border">
</div>
</div>

trouble implementing card like view in html and css

Expected output image illustration:
html, body
{
max-width: 100vw;
max-height: 100vh;
}
html *
{
font-family: Arial !important;
}
.cand1
{
width: 50%;
float:left;
}
.cand2
{
width:50%;
float: right;
}
.prof1,.prof2
{
margin:0;
margin-top: 40;
text-align: center;
}
.name
{
font-weight: bold;
}
.post
{
font-weight: bolder;
}
.card
{
background: rgb(230, 230, 230);
}
h4
{
background: rgb(230, 230, 230);
}
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles/style_vote.css">
</head>
<body>
<div id="header"></div>
<div id="wrapper">
<div id="content">
<div class="card">
<h4 class="post">Post 1</h4>
<div class="cand1">
<div class="prof1">
<img src="images/dummy1.jpg">
<p class="name">Candidate 1</p>
<p class="add">Class</p>
</div>
</div>
<div class="cand2">
<div class="prof2">
<img src="images/dummy1.jpg">
<p class="name">Candidate 2</p>
<p class="add">Class</p>
</div>
</div>
</div>
<div class="card">
<h4 class="post">Post 2</h4>
<div class="cand1">
<div class="prof1">
<img src="images/dummy1.jpg">
<p class="name">Candidate 3</p>
<p class="add">Class</p>
</div>
</div>
<div class="cand2">
<div class="prof2">
<img src="images/dummy1.jpg">
<p class="name">Candidate 4</p>
<p class="add">Class</p>
</div>
</div>
</div>
<div class="card">
<h4 class="post">Post 3</h4>
<div class="cand1">
<div class="prof1">
<img src="images/dummy1.jpg">
<p class="name">Candidate 5</p>
<p class="add">Class</p>
</div>
</div>
<div class="cand2">
<div class="prof2">
<img src="images/dummy1.jpg">
<p class="name">Candidate 6</p>
<p class="add">Class</p>
</div>
</div>
</div>
<div class="card">
<h4 class="post">Post 4</h4>
<div class="cand1">
<div class="prof1">
<img src="images/dummy1.jpg">
<p class="name">Candidate 7</p>
<p class="add">Class</p>
</div>
</div>
<div class="cand2">
<div class="prof2">
<img src="images/dummy1.jpg">
<p class="name">Candidate 8</p>
<p class="add">Class</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Current output image:
I am trying to implement a card like style with html and css.
the h4 tag in the div card produces spaces ,on using margin 0 and padding 0 in css it produces a white line ,I also couldn't find to split each card,tried margin as well as padding attributes for the card div,doesn't seem to work.
also the attributes i apply on the entire card div doesn't seem to apply on the h4 tag, modifying other attributes such as height on the card div makes the dummy image pop out of the card div section
Since your code is pretty messy i created a simple example for you. Hope it helps.
Also try to avoid !important to keep your code clean and maintainable.
section {
background: gray;
padding: 10px 25px;
margin: 0 0 25px 0;
}
section h4 {
margin: 0 0 10px 0;
}
.card-wrapper {
display: flex;
justify-content: space-around;
}
.card--text {
text-align: center;
}
<div class="container">
<section>
<h4>Post</h4>
<div class="card-wrapper">
<div class="card">
<img src="https://dummyimage.com/150x150/000/fff" />
<p class="card--text">
I am the Text
</p>
</div>
<div class="card">
<img src="https://dummyimage.com/150x150/000/fff" />
<p class="card--text">
I am the Text
</p>
</div>
</div>
</section>
<section>
<h4>Post</h4>
<div class="card-wrapper">
<div class="card">
<img src="https://dummyimage.com/150x150/000/fff" />
<p class="card--text">
I am the Text
</p>
</div>
<div class="card">
<img src="https://dummyimage.com/150x150/000/fff" />
<p class="card--text">
I am the Text
</p>
</div>
</div>
</section>
</div>

I want to remove the flickering effect above the image on hover

I have to display a list of products and on hover show some additional information. But on hover, it is flickering a lot. I am not able to understand how to remove that. Any help will be appreciated to remove flickering a lot on hover.
.fixed-width-200 {
width: 200px;
}
.img-responsiveExtended {
display: block;
height: 550px;
max-width: 100%;
overflow: hidden;
text-align: center;
vertical-align: central;
padding-top: 20px;
margin: 0 auto;
}
.parentContent {
position: relative;
/*border:outset;
border-width:thin;
margin:0px;*/
}
.contentWithMargin {
padding: 20px;
height: 200px;
position: absolute;
bottom:150px;
z-index: 1;
background-color:antiquewhite;
opacity:0.8;
}
.imageContentStyle {
z-index: 0;
float:left;
}
.columnBorder {
border: outset;
}
.divWithCenterImgStyle {
text-align:center;
}
.dealPriceStyle {
font-size: 24px;
}
<!DOCTYPE html>
<html>
<head>
<title>
</title>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-4 parentContent" id="parentDiv">
<div class="imageContentStyle">
<div>
<div class="row">
<div class="divWithCenterImgStyle">
<center>
<img class=
"img-responsiveExtended img-container" src=
"http://ecx.images-amazon.com/images/I/A15JTuUMDOL._UY679_.jpg">
</center>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div style="text-align:right">
<strike>
</strike>
<span class=
"dealPriceStyle">
<mark>
<label>$
</label>58.00
</mark>
</span>
</div>
</div>
</div>
</div>
<div>
<h5>Calvin Klein Women's Two-Color Fringe Scarf
<small>
<a href=
"/DreamsNDeals/Home/DealsByVendor?vendorId=1">Amazon
</a>
</small>
</h5>
</div>
</div>
<div class="contentWithMargin collapse" id="38">
<div>
<div class="row modal-body">
<h6>
<span class="label label-warning">
<span class=
"glyphicon glyphicon-time">
</span>
</span>
</h6>
<h5>
<small>
</small>
</h5>
<!-- this text is coming as a flickering effect -->
<p class="text-primary">100% Acrylic Imported
Machine Wash 16" wide Color-blocked scarf with
fringe trim Made in China
</p>
<p class="text-info">Free Shipping
</p>
<div class="col-xs-6">
<p>
<a class="btn btn-primary" href=
"http://www.amazon.com/gp/product/B00Z69JVR8/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B00Z69JVR8&linkCode=as2&tag=dreamsndeal02-20&linkId=CAQNU4JFUUNNWPUB"
target="_blank">Get Deal ยป
</a>
</p>
</div>
<div class="col-xs-6">
<p class="text-primary">
</p>
</div>
</div>
</div>
</div>
</div>
</div>.
</div>
</body>
</html>
You can see the main HTML code and the CSS code as above.

irritating div with content

Here is my http://jsfiddle.net/8wSzk/2/
<div class="row1">
<div>
<div class="circle-menu">
</div>
<p> some option </p>
</div>
<div>
<div class="circle-menu">
</div>
<p> some option <br /> and <br /> another option </p>
</div>
</div>
<div class="row2">
<div>
<div class="circle-menu">
</div>
<p> circle3 </p>
</div>
<div>
<div class="circle-menu">
</div>
<p> circle4 </p>
</div>
</div>
I want my both circle to be in a straight line with its content just below the circle. can somebody help me fixing my css. I am quite new to it.
I think this is what you want. If you want to have two elements side to side, you must use the float attribute. In this case, it would be float:left;.
EDIT
NEW DEMO
Do it like this
<div class="row1">
<div>
<div class="circle-menu">
</div>
</div>
<div>
<div class="circle-menu">
</div>
</div>
</div>
<div class="row1">
<div>
<p> some option </p>
</div>
<div>
<p> some option <br /> and another option </p>
</div>
</div>
New fiddle Code:Works Perfect
Here you go mate, redone it for you. Have a look through it and see what I've done
<div class="row1">
<div class="circle-menu">
</div>
<div class="circle-menu">
</div>
</div>
<div class="options-row">
<div class="option">Some option
</div>
<div class="option">Some more options
</div>
</div>
<div class="row2">
<div class="circle-menu">
</div>
<div class="circle-menu">
</div>
</div>
<div class="options-row">
<div class="option">Even more options
</div>
<div class="option">Got the idea?
</div>
</div>
.row1 {
height:90px;
}
.row2 {
height:90px;
}
.circle-menu {
width: 80px;
height: 80px;
display: inline-block;
float:left;
background-color: #cacece;
border-radius: 50%;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
cursor: pointer;
margin: 5px;
}
.option {
display:inline-block;
width:80px;
margin: 5px;
text-align:center;
vertical-align:top;
}
.options-row {
}