Display text below price - html

If you visit this link, you can see below image at the center of the page:
On this site, if you mouse over currency symbol present on top right of window, you can see drop down options, once you change a dropdown option, you can see "Usually Delivered in 3-5 business days" text next to price - I want this text below the Price, as in the next image:
This is the CSS I am using and, it doesn't matter how I try, can't get the desired result. Can someone please have an advice for me? Thank you.
font-family: 'Roboto Condensed', sans-serif;
color: #636363;
font-size: 14px;
line-height: 1.5;
}

on
.price-info
Take off
max-width: 31%;
So that it takes up the entire line

Try taking the float:left off of your p tag. That should fix a few issues on your page and might fix the issue you're having with the text displaying in the wrong area.
You should probably also add some html and css to your question. Without it it makes it a hassle to answer.

$(document).ready(function() {
$('.qty-btn').click(function(){
if($('.qty').val() > 0)
{
$('.deliveryMsg').text('Usually Delivered in 3-5 days.');
}else {
alert("Qty must be greater than 0");
}
});
});
body {
background: silver;
}
.section {
height: 400px;
width: 500px;
margin-bottom: 20px;
background: #FFFFFF;
margin-left: 100px;
padding: 10px;
}
/* used for demo purposes */
.product-img {
background: silver;
opacity: 0.5;
height: 150px;
width: 150px;
/* center the img within the col */
display: block;
margin: auto;
}
.col-left {
width: 40%;
}
.col-right {
float: right;
margin-top:-165px;
text-align: left;
width: 60%;
}
.title {
font-weight: bold;
}
.price {
margin-top: -5px;
margin-bottom: -5px;
color: blue;
}
input[type="text"] {
width: 50px;
}
span {
font-size: small;
font-weight: bold;
}
input[type="button"] {
background: orange;
color: #FFFFFF;
}
.qty {
width: 20px !important;
}
.wishlist {
width: 130px !important;
}
.deliveryMsg {
font-weight: bold;
opacity: 0.5;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="section">
<div class="col-left">
<div class="product-img"></div>
</div>
<div class="col-right">
<p class="title" >Golden Waves Marble Texture Apple IPhone 4 Phone Case</p>
<hr />
<ul>
<li>Device: Apple iPhone 4</li>
<li>Design: Marbles</li>
<li>Material: Polycarbonate Hard Case</li>
</ul>
<hr />
<h3 class="price">499.00</h3>
<hr />
<form>
<span>Check Delivery Availability <input type="text" placeholder="Enter PIN Code" /> <input type="button" value="CHECK" /></span>
<br /><br />
<span>Qty: <input class="qty" type="text" /> <input class="qty-btn" type="button" value="ADD TO CART" /> <input class="wishlist" type="text" placeholder="SAVE TO WISHLIST" /></span>
<br /><br />
<span class="deliveryMsg"></span>
</form>
</div>
</div>
<div class="section">
<h2>Product Description</h2>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
</div>
Hope that helps!

Related

Responsive tooltip in CSS

I have made a tooltip on hover over an icon and it works fine in desktop view.
Working Snippet:
.tooltip {
position: relative;
display: inline-block;
}
.tooltip img {
width: 15px;
}
.tooltip .tooltiptext[data-position="bottom"] {
visibility: hidden;
width: 400px;
background-color: #fff;
color: #000;
text-align: center;
border-radius: 0.5rem;
border-width: 1px;
border-color: #e2e8f0;
padding: 5px;
position: absolute;
z-index: 1;
top: 100%;
left: 50%;
margin-left: -60px;
}
.tooltip:hover .tooltiptext {
visibility: visible;
}
<label> Some Label </label>
<span className="ml-2">
<div class="tooltip">
<img
src="https://www.svgrepo.com/show/2297/doubts-button.svg"
alt="help text"
/>
<span data-position="bottom" class="tooltiptext">
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text ever
since the 1500s, when an unknown printer took a galley of type and
scrambled it to make a type specimen book. It has survived not only five
centuries, but also the leap into electronic typesetting, remaining
essentially unchanged. It was popularised in the 1960s with the release
of Letraset sheets containing Lorem Ipsum passages, and more recently
with desktop publishing software like Aldus PageMaker including versions
of Lorem Ipsum.
</span>
</div>
</span>
Whereas in mobile view, this leads to horizontal scroll bar.
Please switch to mobile view to see the issue.
Things I tried:
I have tried removing margin-left and modified left value like,
.tooltip .tooltiptext[data-position="bottom"] {
visibility: hidden;
width: 400px;
.
.
.
.
.
left: 0%;
margin-left: 0px;
}
But this doesn't work... Kindly please help me to make this tooltip responsive in mobile devices using CSS. Big thanks in advance.
Just add the following css:
#media screen and (max-width: 576px) {
.tooltiptext {
width: 300px;
}
}

How to make indent of icon

I have a text and when I press on icon I can read more, and when press on another icon I can read less. The question is that how can make indent of top, for read more and read less icons to see them below than text, and make them(icons) in the center? The icons are +, -.
This is html:
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
<input id="read-more-state-1" class="read-more-state" type="checkbox">
<span class="read-more-target">
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages.
</span>
<label for="read-more-state-1" class="read-more-button">
<span class="read-more-button-icon"></span>
</label>
</p>
This is CSS:
.read-more-state {
display: none;
}
.read-more-button {
display: none;
}
#media only screen and (max-width: 600px) {
.read-more-target {
opacity: 0;
font-size: 0;
transition: .25s ease;
}
.read-more-button {
display: inline-block;
border-radius: 0.25em;
width: 1em;
height: 1em;
background: url(img/arrow%20grad.svg);
background-size: cover;
cursor: pointer;
}
.read-more-state:checked + .read-more-target {
opacity: 1;
font-size: inherit;
}
.read-more-state:checked ~ .read-more-button {
background: url(img/arrow%20up%20grad.svg);
background-size: cover;
cursor: pointer;
}
}
If you want the + and - icons to appear centered and below the text, your easiest option would be to make the p element positioned relative, and your icons positioned absolute.
p{
position: relative;
padding-bottom: 1.5em;
}
.read-more-button {
position: absolute;
bottom: 0px;
left: 50%;
}
Here is a codepen link.

CSS Animation effect with flexbox with large content not working

I tried to create the flexbox collapsible menu using HTML,css and angularjs the collapsible menu functionality working fine but the css transition effect not working when the content are big(ex: with "Lorem Ipsum" text block) its working fine when the "Lorem Ipsum" text block are not there, I couldn't find out the reason for the same. Thanks in advance for the help.
Plnkr Demo
var app = angular.module('app', []);
app.controller('myctrl', function($scope) {
$scope.toggle = function() {
angular.element(document.querySelector('.sidebar')).toggleClass('isClosed');
angular.element(document.querySelector('.hideButton')).toggleClass('isClosed');
angular.element(document.querySelector('.sidebar ul.nav')).toggleClass('isClosed');
}
})
/*
* ==== RESETS ====
*/
* {
margin: 0;
padding: 0;
}
*,
*:before,
*:after {
box-sizing: border-box;
}
/*
* ==== IMPORTS ====
*/
/*
* ==== STYLING ====
*/
html,
body {
height: 100%;
}
body {
font-family: -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
}
.wrapper {
display: flex;
height: 100%;
padding: 20px;
}
.hideButton {
display: flex;
min-height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.hideButton a {
border: 1px solid;
border-radius: 2px;
}
/*
* ==== SIDEBAR ====
*/
.sidebar {
display: flex;
min-height: 100%;
flex-grow: auto;
transition: all linear 0.3s;
border: 1px solid;
border-radius: 5px;
padding: 5px;
}
.sidebar.isClosed {
flex-grow: 0;
border: none;
}
.sidebar ul.nav {
display: flex;
flex-direction: column;
width: 100%;
opacity: 1;
}
.sidebar ul.nav.isClosed {
display: none;
}
.sidebar ul.nav li {
list-style: none;
padding: 20px 0;
border: 1px solid #ccc;
border-radius: 5px;
margin: 2px 0;
}
.sidebar ul.nav li a {
display: block;
text-decoration: none;
color: #666;
text-align: center;
padding: 0 2px;
}
.sidebar ul.nav li a:hover {
color: #000;
}
.sidebar div {
max-width: 180px;
}
/*
* ==== CONTENT ====
*/
.content {
min-height: 100%;
flex-grow: 9;
padding: 40px;
transform: translate3d(0, 0, 0);
transition: transform 0.3s;
}
/*
* ==== TOGGLE BUTTON ====
*/
a.button {
cursor: pointer;
/* position: absolute;
top: 10px;
left: 10px;*/
display: block;
}
a.button:before {
font-weight: bold;
font-size: 20px;
content: "<";
transition: content linear 1s;
}
.isClosed a.button::before {
content: '>';
transition: content linear 1s;
}
/*
* ==== MEDIA QUERIES ====
*/
#media only screen and (max-device-width: 736px) and (orientation: portrait) {
.wrapper {
flex-direction: column;
}
.sidebar {
min-height: 60px;
max-height: 60px;
}
.sidebar ul.nav {
padding: 20px;
flex-direction: row;
}
.sidebar ul.nav li {
display: inline-block;
padding: 2%;
}
.content {
/*TBD*/
}
.content a.button {
display: none;
}
}
<!DOCTYPE html>
<html ng-app="app">
<head>
<script data-require="angular.js#*" data-semver="4.0.0" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.10/angular.min.js"></script>
<script data-require="angular.js#*" data-semver="4.0.0" src="script.ts"></script>
<script data-require="angular.js#*" data-semver="4.0.0" src="system.config.js"></script>
<script data-require="angular.js#*" data-semver="4.0.0" src="tsconfig.json"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body ng-controller="myctrl">
<div id="wrapper" class="wrapper">
<div id="aside" class="sidebar">
<div>
<ul class="nav">
<li>Home</li>
<li>Experience is the key of the item of the rest of the kind</li>
<li>Services</li>
<li>Bio</li>
<li>Contact</li>
</ul>
</div>
</div>
<!-- /Aside -->
<div class="hideButton">
<div class="Aligner">
<a class="button" ng-click="toggle()"></a>
</div>
</div>
<div id="content" class="content">
<h1>Flexbox Off-Canvas Side Menu</h1>
<h2>Easy to use</h2>
<div>
What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type
specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more
recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Why do we use it? It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The
point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem
Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like). Where
does it come from? Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College
in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and
1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit
amet..", comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in
their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. Where can I get some? There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by
injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators
on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which
looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.
</div>
</div>
<!-- /Content -->
</div>
</body>
</html>
<!DOCTYPE html>
<html ng-app="app">
<head>
<script data-require="angular.js#*" data-semver="4.0.0" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.10/angular.min.js"></script>
<script data-require="angular.js#*" data-semver="4.0.0" src="script.ts"></script>
<script data-require="angular.js#*" data-semver="4.0.0" src="system.config.js"></script>
<script data-require="angular.js#*" data-semver="4.0.0" src="tsconfig.json"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body ng-controller="myctrl">
<div id="wrapper" class="wrapper">
<div id="aside" class="sidebar">
<div>
<ul class="nav">
<li>Home</li>
<li>Experience is the key of the item of the rest of the kind</li>
<li>Services</li>
<li>Bio</li>
<li>Contact</li>
</ul>
</div>
</div>
<!-- /Aside -->
<div class="hideButton">
<div class="Aligner">
<a class="button" ng-click="toggle()"></a>
</div>
</div>
<div id="content" class="content">
<h1>Flexbox Off-Canvas Side Menu</h1>
<h2>Easy to use</h2>
<div>
What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type
specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and
more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Why do we use it? It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.
The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use
Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
Where does it come from? Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney
College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections
1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum
dolor sit amet..", comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced
in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. Where can I get some? There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form,
by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators
on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum
which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.
</div>
</div>
<!-- /Content -->
</div>
</body>
</html>
/*
* ==== RESETS ====
*/
* {
margin: 0;
padding: 0;
}
*,
*:before,
*:after {
box-sizing: border-box;
}
/*
* ==== IMPORTS ====
*/
/*
* ==== STYLING ====
*/
html,
body {
height: 100%;
}
body {
font-family: -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
}
.wrapper {
display: flex;
height: 100%;
padding: 20px;
}
.hideButton {
display: flex;
min-height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.hideButton a {
border: 1px solid;
border-radius: 2px;
}
/*
* ==== SIDEBAR ====
*/
.sidebar {
display: flex;
min-height: 100%;
flex-grow: auto;
transition: all linear 5s;
border: 1px solid;
border-radius: 5px;
padding: 5px;
opacity: 1;
}
.sidebar.isClosed {
flex-grow: 0;
border: none;
opacity: 0;
}
.sidebar ul.nav {
display: flex;
flex-direction: column;
width: 100%;
opacity: 1;
transition: all linear 5s;
}
.sidebar ul.nav.isClosed li {
display: none;
}
.sidebar ul.nav li {
list-style: none;
padding: 20px 0;
border: 1px solid #ccc;
border-radius: 5px;
margin: 2px 0;
transition: all linear 5s;
}
.sidebar ul.nav li a {
display: block;
opacity:1;
text-decoration: none;
color: #666;
text-align: center;
padding: 0 2px;
transition: all linear 5s;
}
.sidebar ul.nav.isClosed li a{
display:none;
opacity:0;
}
.sidebar ul.nav li a:hover {
color: #000;
}
.sidebar div {
max-width: 180px;
}
/*
* ==== CONTENT ====
*/
.content {
min-height: 100%;
flex-grow: 9;
padding: 40px;
transform: translate3d(0, 0, 0);
transition: transform 5s;
}
/*
* ==== TOGGLE BUTTON ====
*/
a.button {
cursor: pointer;
/* position: absolute;
top: 10px;
left: 10px;*/
display: block;
}
a.button:before {
font-weight: bold;
font-size: 20px;
content: "<";
transition: content linear 1s;
}
.isClosed a.button::before {
content: '>';
transition: content linear 1s;
}
/*
* ==== MEDIA QUERIES ====
*/
#media only screen and (max-device-width: 736px) and (orientation: portrait) {
.wrapper {
flex-direction: column;
}
.sidebar {
min-height: 60px;
max-height: 60px;
}
.sidebar ul.nav {
padding: 20px;
flex-direction: row;
}
.sidebar ul.nav li {
display: inline-block;
padding: 2%;
}
.content {
/*TBD*/
}
.content a.button {
display: none;
}
}
var app = angular.module('app', []);
app.controller('myctrl', function($scope) {
$scope.toggle = function() {
angular.element(document.querySelector('.sidebar')).toggleClass('isClosed');
angular.element(document.querySelector('.hideButton')).toggleClass('isClosed');
angular.element(document.querySelector('.sidebar ul.nav')).toggleClass('isClosed');
}
})

Why Paragraph don't align next to Image in HTML?

I'm learning frontend web design and i'm trying to build a fully responsive blog like static page.
But my problem is the image are not aligning properly with the paragraph.
As the "Dont Forget to follow Up!" image was supposed to come in the first post content only that is Don't forget to follow Up should be with content What is Lorem Ipsum .. But it's showing up with Where Does it comes from.
My Question is Why Does This happens ? workaround i've seen here How to float paragraph next to image without wrapping the image? but i didn't get this why this problem actually happens.
body {
background-color: #DCDBD9;
color: #2C2C2C;
font: normal 100% Cambria, Georgia, serif;
}
h1 {
font-size: 1.5em;
font-style: italic;
font-weight: normal;
}
h1 a {
color: #747474;
font: bold 0.45833em Calibri, Optima, Arial, sans-serif;
letter-spacing: 0.15em;
text-transform: : uppercase;
text-decoration: none;
}
#page {
margin: 36px auto;
width: 90%;
}
#nav {
float: right;
/*padding: 42px 0 0 30px;*/
}
#nav li {
float: left;
margin: 0 0 0 5px;
}
.blog {
clear: both;
margin: 50px auto 53px;
width: 93.75%;
}
.blog .main {
float: left;
width: 62.88%;
/* 566px / 900px */
}
.blog .other {
float: right;
width: 36.77%;
/* 331px / 900px */
}
.lede {
padding: 0.8em 5.333%;
}
.recent-entries {
margin: 0 auto;
width: 69.788%;
/* 231 / 331px */
}
.article {
padding: 40px 8.480%;
}
.date {
float: left;
margin-left: -17.088%;
/* 81px / 474px */
width: 14.55%;
/* 69px / 474px */
border: 1px solid black;
border-radius: 2px;
padding: 0.59%;
transition-property: background;
transition-duration: 0.3s;
transition-timing-function: ease;
}
.date:hover {
background: #9c3;
}
img,
embed,
object,
video {
max-width: 100%;
}
.figure {
float: right;
margin-bottom: 0.5em;
margin-left: 2.531%;
/* 12px / 474px */
width: 48.734%;
/* 231px / 474px */
}
h2 {
color: #F90B6D;
font-family: 'Open Sans', sans-serif;
font-size: 1.2em;
font-weight: 300;
}
p {
color: #222;
font-family: 'Open Sans', sans-serif;
font-size: 0.9em;
font-weight: 400;
}
<!-- <h1> This is the top header! Read More </h1> -->
<div id="page">
<ul id="nav">
<li>About me
</li>
<li>About Blog
</li>
<li>Stuff
</li>
<li>Junk Stuff
</li>
</ul>
<div class="blog section">
<h1 class="lede">Responsive Blog </h1>
<div class="main">
<div class="article">
<div>
<div class="date">
1 Sept 2015
</div>
<h2> What is Lorem Ipsum ?</h2>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages , and more recently
with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<div class="figure">
<p>
<img src="http://i.stack.imgur.com/I3hYQ.png" alt="">
<b class="figcaption">Remember This</b>
</p>
</div>
</div>
<div class="date">
5 Sept 2015
</div>
<h2> Where does it comes from ? </h2>
<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked
up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus
Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from
a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original
form, accompanied by English versions from the 1914 translation by H. Rackham.</p>
</div>
</div>
<!--/end.main -->
<div class="other">
<p>Recent Enteries</p>
<div class="recent-entries">
<p>1.Simply First Entry</p>
<p>2. Simply second Entry</p>
</div>
</div>
<!-- /end .other -->
</div>
<!--/end .blog.section -->
</div>
<!-- /end #page-->
floatting element should come first/ahead in code from element in the natural flux.
see (among others links you can find on search engines) : https://css-tricks.com/all-about-floats/
body {
background-color: #DCDBD9;
color: #2C2C2C;
font: normal 100% Cambria, Georgia, serif;
}
h1 {
font-size: 1.5em;
font-style: italic;
font-weight: normal;
}
h1 a {
color: #747474;
font: bold 0.45833em Calibri, Optima, Arial, sans-serif;
letter-spacing: 0.15em;
text-transform: : uppercase;
text-decoration: none;
}
#page {
margin: 36px auto;
width: 90%;
}
#nav {
float: right;
/*padding: 42px 0 0 30px;*/
}
#nav li {
float: left;
margin: 0 0 0 5px;
}
.blog {
clear: both;
margin: 50px auto 53px;
width: 93.75%;
}
.blog .main {
float: left;
width: 62.88%;
/* 566px / 900px */
}
.blog .other {
float: right;
width: 36.77%;
/* 331px / 900px */
}
.lede {
padding: 0.8em 5.333%;
}
.recent-entries {
margin: 0 auto;
width: 69.788%;
/* 231 / 331px */
}
.article {
padding: 40px 8.480%;
}
.date {
float: left;
margin-left: -17.088%;
/* 81px / 474px */
width: 14.55%;
/* 69px / 474px */
border: 1px solid black;
border-radius: 2px;
padding: 0.59%;
transition-property: background;
transition-duration: 0.3s;
transition-timing-function: ease;
}
.date:hover {
background: #9c3;
}
img,
embed,
object,
video {
max-width: 100%;
}
.figure {
float: right;
margin-bottom: 0.5em;
margin-left: 2.531%;
/* 12px / 474px */
width: 48.734%;
/* 231px / 474px */
}
h2 {
color: #F90B6D;
font-family: 'Open Sans', sans-serif;
font-size: 1.2em;
font-weight: 300;
}
p {
color: #222;
font-family: 'Open Sans', sans-serif;
font-size: 0.9em;
font-weight: 400;
}
<!-- <h1> This is the top header! Read More </h1> -->
<div id="page">
<ul id="nav">
<li>About me
</li>
<li>About Blog
</li>
<li>Stuff
</li>
<li>Junk Stuff
</li>
</ul>
<div class="blog section">
<h1 class="lede">Responsive Blog </h1>
<div class="main">
<div class="article">
<div>
<div class="date">
1 Sept 2015
</div>
<div class="figure">
<p>
<img src="http://dummyimage.com/290x400&text=Dont-Forget-To-Follow-Up" alt="">
<b class="figcaption">Remember This</b>
</p>
</div>
<h2> What is Lorem Ipsum ?</h2>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages , and more recently
with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
<div class="date">
5 Sept 2015
</div>
<h2> Where does it comes from ? </h2>
<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked
up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus
Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from
a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original
form, accompanied by English versions from the 1914 translation by H. Rackham.</p>
</div>
</div>
<!--/end.main -->
<div class="other">
<p>Recent Enteries</p>
<div class="recent-entries">
<p>1.Simply First Entry</p>
<p>2. Simply second Entry</p>
</div>
</div>
<!-- /end .other -->
</div>
<!--/end .blog.section -->
</div>
<!-- /end #page-->
Each HTML element has got a display value which defines how the element is displayed. This value for most elements is block or inline; block elements always start on a new line and take up the full width available while inline elements stay on the same line and take only the amount of space they need.
<p> elements fall within the block elements class while <img> elements fall in the inline one.
For further explanations and example take a look here W3C School - HTML Block and Inline Elements

How to wrap one div id around another one?

How to wrap one div around another? I have following two div ids:
#course {
width: 325px;
padding-right: 25px;
border-right: 1px solid #999;
border-top: 1px solid #999;
}
#home-page-sign-up {
width: 275px;
#padding-left: 25px;
float: right;
margin: auto;
#position: relative;
display: block;
clear: both;
}
I want #course to be on left and #home-page-sign-up on right just next to it. I do get block on left and right as assigned but one is below another, I want them to be side by side.
How can I achieve it?
You will want to float both of them left:
#course{
float:left;
width:325px;
padding-right:25px;
border-right:1px solid #999;
border-top:1px solid #999;
}
#home-page-sign-up {
width:275px;
#padding-left:25px;
float:left;
margin: auto;
#position:relative;
display:block;
}
Just make sure #course falls first in the html
Try this:
#course{
width:325px;
float:left;
padding-right:25px;
border-right:1px solid #999;
border-top:1px solid #999;
}
#home-page-sign-up {
width:275px;
#padding-left:25px;
float:left;
margin: auto;
#position:relative;
}
Then, in your body tags, do:
<div id="course">Course Div Content here...</div>
<div id="home-page-sign-up">Home Sign-up Content here...</div>
<div style="clear: left;"></div>
That's one way...that hopefully works ;)
I dont know what you mean by "wrap around" but if you want the divs to be next to each other, put float: left; in both styles...
see fiddle for code and demo
Fiddle: http://jsfiddle.net/t4LUF/3/
Demo: http://jsfiddle.net/t4LUF/3/embedded/result/
NOTE: For demo purpose i gave border to all div's you can change as per your need.
HTML:
<div id="big-container">big-container
<div id="container">
<div id="course">course Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div>
<div id="home-page-sign-up">home-page-sign-up </div>
</div>
</div>
SS: http://img812.imageshack.us/img812/3783/divcontainersidebyside.jpg