I have a problem with images displaying in different heights and text underneath not aligning.
this is the mark up, I have a six row containers to display 6 images
<div class="row">
<div class="posts">
<img src="images/bond.jpg" alt="quantum of solace">
<h3 class="title">Quantum of Solace</h3>
<p class="post-info">PG13 | 106min</p>
</div>
</div>
I am setting each post to 14% coz there are 6 of them allowing for 2.5% margin right. I tried to wrap image in a div and set that to overflow hidden, but didn't work.
.row {
width: 100%;
}
.posts {
width: 14%;
float: left;
margin-right: 2.5%;
}
.posts img {
width: 100%;
max-width: 100%;
border-radius: 0.5em;
}
If you can change the disposition of the nodes, you could align the text below the images using: display:table. See the next example:
.table {
display: table ;
}
.row {
display: table-row ;
}
.header, .title, .post-info {
display: table-cell ;
width: 14%;
padding: 0 1.25% 0.25% 1.25% ;
vertical-align: top ;
}
.header img {
max-width: 100%;
border-radius: 0.5em;
}
<div class="table">
<div class="row">
<div class="header">
<img src="https://upload.wikimedia.org/wikipedia/en/2/2d/Quantum_of_Solace_-_UK_cinema_poster.jpg" alt="quantum of solace">
</div>
<div class="header">
<img src="https://upload.wikimedia.org/wikipedia/en/6/66/E_t_the_extra_terrestrial_ver3.jpg" alt="E.T. the Extra-Terrestrial ">
</div>
<div class="header">
<img src="https://upload.wikimedia.org/wikipedia/en/a/a2/Star_Wars_The_Force_Awakens_Theatrical_Poster.jpg" alt="Star Wars VII">
</div>
<div class="header">
<img src="https://upload.wikimedia.org/wikipedia/en/8/8e/DisneyCheshireCat.jpg" alt="Alice in Wonderland">
</div>
<div class="header">
<img src="https://upload.wikimedia.org/wikipedia/en/6/6c/XFilesMoviePoster.jpg" alt="The X-Files">
</div>
<div class="header">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/Poster_-_Gone_With_the_Wind_01.jpg/440px-Poster_-_Gone_With_the_Wind_01.jpg" alt="Gone with the Wind">
</div>
</div>
<div class="row">
<h4 class="title">Quantum of Solace</h4>
<h4 class="title">E.T. the Extra-Terrestrial </h4>
<h4 class="title">Star Wars: Episode VII The Force Awakens</h4>
<h4 class="title">Alice in Wonderland</h4>
<h4 class="title">The X-Files: Fight the Future</h4>
<h4 class="title">Gone with the Wind</h4>
</div>
<div class="row">
<p class="post-info">PG13 | 106min</p>
<p class="post-info">G | 115min</p>
<p class="post-info">PG13 | 136min</p>
<p class="post-info">G | 187min</p>
<p class="post-info">PG13 | 121min</p>
<p class="post-info">G | 238min</p>
</div>
</div>
Related
I have 4 columns of products with a header, description and image below and I want the text areas to at the top and the images to each line up at the bottom so they stay aligned when the screen is resized.
At the moment the images move up and down as the text wraps - which looks very untidy as they each have a different amount of text.
I have tried using tables and position absolute and they each cause problems and don't work properly.
Here is my code:
#product-landing .landing-row {
position: relative;
height: inherit;
}
.product-landing,
.product-landing-2,
.product-landing-3 {
margin-right: 2.0533%;
}
.product-landing,
.product-landing-2,
.product-landing-3,
.product-landing-4 {
margin-left: 0px;
display: inline-block;
position: relative;
height: 100%;
vertical-align: top;
width: 22.978%;
}
.product-landing-4 {
margin-right: 0px;
}
#product-landing p {
margin-top: 0px;
margin-bottom: 5px;
clear: both;
width: 100%;
}
.product-landing .land-image {
vertical-align: bottom;
}
.product-landing img,
.product-landing-2 img,
.product-landing-3 img,
.product-landing-4 img {
margin-top: 10px;
display: block;
max-width: 350px;
margin: 0 auto;
bottom: 0px;
width: 100%;
}
<div id="product-landing">
<div class="landing-row">
<div class="product-landing">
<div id="product-text">
<div id="offer-title">Product1</div>
<p>
</p>
<p><b><i>Product description</i></b></p>
</div>
<p class="land-image">
<img src="http://image1.jpg">
</p>
</div>
<div class="product-landing-2">
<div id="product-text">
<div id="offer-title">Product2</div>
<p>
</p>
<p><b><i>Product description</i></b></p>
</div>
<p class="land-image">
<img src="http://image2.jpg">
</p>
</div>
<div class="product-landing-3">
<div id="product-text">
<div id="offer-title">Product3</div>
<p>
</p>
<p><b><i>Product description</i></b></p>
</div>
<p class="land-image">
<img src="http://image3.jpg">
</p>
</div>
<div class="product-landing-4">
<div id="product-text">
<div id="offer-title">Product4</div>
<p>
</p>
<p><b><i>Product description</i></b></p>
</div>
<p class="land-image">
<img src="http://image4.jpg">
</p>
</div>
</div>
</div>
You can use flexbox for this
#product-landing .landing-row {
display:flex;
flex-direction:row;
justify-content:space-between;
flex-wrap:wrap;
}
#product-landing p {
margin-top: 0px;
margin-bottom: 5px;
}
.product-landing {
display:flex;
flex-direction:column;
width: 22.978%;
}
.product-landing img {
margin-top: 10px;
display: block;
max-width: 350px;
width: 100%;
}
.product-text {
flex-grow:1;
}
<div id="product-landing">
<div class="landing-row">
<div class="product-landing">
<div class="product-text">
<div class="offer-title">Product1</div>
<p><b><i>Product description</i></b></p>
</div>
<p class="land-image">
<img src="http://via.placeholder.com/350x150">
</p>
</div>
<div class="product-landing">
<div class="product-text">
<div class="offer-title">Product2</div>
<p><b><i>Product description</i></b></p>
</div>
<p class="land-image">
<img src="http://via.placeholder.com/350x150">
</p>
</div>
<div class="product-landing">
<div class="product-text">
<div class="offer-title">Product2</div>
<p><b><i>Product description</i></b></p>
</div>
<p class="land-image">
<img src="http://via.placeholder.com/350x150">
</p>
</div>
<div class="product-landing">
<div class="product-text">
<div class="offer-title">Product3</div>
<p><b><i>Product description Product description Product description</i></b></p>
</div>
<p class="land-image">
<img src="http://via.placeholder.com/350x150">
</p>
</div>
<div class="product-landing">
<div class="product-text">
<div class="offer-title">Product4</div>
<p><b><i>Product description</i></b></p>
</div>
<p class="land-image">
<img src="http://via.placeholder.com/350x150">
</p>
</div>
</div>
Would've commented this if I could; Have you tried using flex-box? https://css-tricks.com/snippets/css/a-guide-to-flexbox/
This has saved me on many occasions where relative/absolute combinations fail.
To be more specific;
.wrapper{
display:flex;
flex-direction:column;
}
.text-wrapper-div{
align-self:flex-start;
}
.image-wrapper-div{
align-self:flex-end;
}
.wrapper is your parent-container, which flexes from top to bottom (column).
Inside are the two div's for text and image, which align themselves to the top (flex-start) and bottom (flex-end).
Have a look at the link if you get stuck - it's pretty well documented I think! Good luck.
Hope this may help you,
Using flex is considered to be best practice. The table and table-cell are the old ways as we have came way far and new properties are being invented day by day. As using the flex will adjust the content itself as you resize the browser and has its own qualities.
#product-landing .landing-row {
display: flex;
flex-direction: row;
}
.product-landing,
.product-landing-2,
.product-landing-3 {
margin-right: 2.0533%;
}
.product-landing,
.product-landing-2,
.product-landing-3,
.product-landing-4 {
flex: 1;
text-align: center;
}
#product-landing p {
margin-top: 0px;
margin-bottom: 5px;
clear: both;
width: 100%;
}
.product-landing .land-image {
vertical-align: bottom;
}
.product-landing img,
.product-landing-2 img,
.product-landing-3 img,
.product-landing-4 img {
margin-top: 10px;
display: block;
max-width: 350px;
margin: 0 auto;
bottom: 0px;
width: 100%;
}
<div id="product-landing">
<div class="landing-row">
<div class="product-landing">
<div id="product-text">
<div id="offer-title">Product1</div>
<p>
</p>
<p><b><i>Product description</i></b></p>
</div>
<p class="land-image">
<img src="http://image1.jpg">
</p>
</div>
<div class="product-landing-2">
<div id="product-text">
<div id="offer-title">Product2</div>
<p>
</p>
<p><b><i>Product description</i></b></p>
</div>
<p class="land-image">
<img src="http://image2.jpg">
</p>
</div>
<div class="product-landing-3">
<div id="product-text">
<div id="offer-title">Product3</div>
<p>
</p>
<p><b><i>Product description</i></b></p>
</div>
<p class="land-image">
<img src="http://image3.jpg">
</p>
</div>
<div class="product-landing-4">
<div id="product-text">
<div id="offer-title">Product4</div>
<p>
</p>
<p><b><i>Product description</i></b></p>
</div>
<p class="land-image">
<img src="http://image4.jpg">
</p>
</div>
</div>
</div>
Hi have been working on an AngularJS POS system what needs to print receipts after making a sale. I display a sales summary and use ng-print to print the div containing the sales summary. I do the usual with display:none for all other elements and then the rest is display:block. There are a some rows that need to print in a line so I set them to inline but I cannot get spacing between these or even align.
This is an image of the sales summary and the spacing for Desc, Price and Qty.
Here is the html for this:
<div id="sales-summary">
<div layout="column" class="sales-summary-headers" style="text-align: center" style="margin: 3px">
<div class="print-address">{{transaction.store.name}}</div>
<div class="print-address">{{transaction.store.address1}}</div>
<div class="print-address">{{transaction.store.address2}}</div>
<div class="print-address">{{transaction.store.address3}}</div>
<div class="print-address">{{transaction.store.contact}}</div>
<br/>
<div class="print-address">You were served by: {{transaction.employee.firstName}}</div>
</div>
<div class="sales-summary-headers">
<div style="text-align: center"> Sales Summary</div>
</div>
<md-divider></md-divider>
<div layout="row" class="print-row">
<div class="print-left" flex="65"><p>Desc</p></div>
<div class="print-mid" flex="15"><p>Qty</p></div>
<div class="print-right" layout-align="center end"><p>Price</p></div>
</div>
<md-divider></md-divider>
<div layout="row" class="print-row" ng-repeat="item in saleItems">
<div class="print-left" flex="65">{{item.product.description}} </div>
<div class="print-mid" flex="15">{{item.quantity}} </div>
<div class="print-right" layout-align="center end">{{item.unitTotalDisplayPrice | currency:"€"}} </div>
<br/>
</div>
<md-divider></md-divider>
<md-divider></md-divider>
<div layout="row" class="print-row">
<div flex="80">Subtotal</div>
<div layout-align="center end">{{ subTotal | currency:"€" }}</div>
</div>
<div layout="row" class="print-row">
<div flex="80">Tax</div>
<div layout-align="center end">{{ tax | currency:"€" }}</div>
</div>
<div layout="row" class="print-row">
<div flex="80">Total</div>
<div layout-align="center end">{{ total | currency:"€" }}</div>
</div>
<md-divider></md-divider>
<div style="text-align: center" class="sales-summary-headers">
<div>Payments</div>
</div>
<md-divider></md-divider>
<div layout="row" class="print-row" ng-repeat="payment in payments">
<div flex="80">{{ payment.type }}</div>
<div layout-align="center end">{{ payment.amount | currency:"€" }}</div>
<br/>
</div>
<md-divider></md-divider>
<div layout="row" class="print-row">
<div flex="80">Change</div>
<div layout-align="center end">{{ transaction.changeValue | currency:"€"}}</div>
</div>
<div>
<div>
Some message for the store...
</div>
</div>
<br/>
<div class="print-row" style="text-align: center" style="margin: 3px">
<h4>Till: {{ transaction.till.name }}</h4>
</div>
</div>
<div layout="row" >
<md-button ng-print print-element-id="sales-summary">
Print
</md-button>
<md-button ng-click="email()">
Email
</md-button>
<span flex></span>
<md-button ng-click="finishTransaction()" >
Done
</md-button>
</div>
It prints only the elements within id="sales-summary".
I have tried to set spacing in CSS but nothing works
Here is code of the CSS. It is a little dirty as I have added in background colors and text color to try isolate elements and see what space the take up on the print preview.
#media print {
body * {
display:none;
}
md-sidenav * {
display: none !important;
}
section * {
display: none !important;
}
#printSection, #printSection * {
display: block;
}
#printSection {
position:absolute;
left:0;
right: 0;
top:0;
}
.print-row *{
width:100%;
display: inline !important;
color: green;
/*background-color: pink;*/
margin: 2px;
}
.print-row div *{
display: inline !important;
}
.print-left{
text-align: left;
width:65% !important;
background-color: blue;
color: black;
}
.print-mid p{
width:65% !important;
background-color: green;
color: white;
}
.print-row{
background-color: yellow;
width:100% !important;
/*font-size: 0pt;*/
}
.print-left{
text-align: left;
width:65% !important;
/*font-size: 12pt;*/
}
.print-mid{
width:15% !important;
text-align: right;
/*font-size: 12pt;*/
}
.print-right{
width:20% !important;
text-align: right !important;
/*font-size: 12pt;*/
}
Here is what prints. No spacing between the desc, Qty Price.
Any help would be greatly appreciated.
I think the reason is the rule with this selector:
.print-row *{
It defines all these elements as inline elements, by which their width setting becomes meaningless. Try to set this to inline-block
I'd like to have 5 divs (1, 2, 3, ...) displayed like this:
+---+ +---+ +---+
| 1 | | | | 4 |
+---+ | 3 | +---+
| 2 | | | | 5 |
+---+ +---+ +---+
where 3's height is twice as mush as 1, 2, 4, 5's ones.
Is there a way to position them like this without wrapping 1, 2 and 4, 5 into divs ?
Here's my HTML markup :
<div class="AlaOracles">
<div class="AlaOracle">
<img src="http://mywebsite.ru/wp-content/uploads/shutterstock_132379904.jpg" alt="mange l'écran" />
<div>
<div class="Header">
<div>
<div>
Some text
</div>
</div>
</div>
<div class="Body">
<div>
<div>
Some text<br />
[button link="#" color="orange" size="medium" type="flat" shape="square" target="_parent" title=" Test "] Mode de cuisson [/button]
</div>
</div>
</div>
</div>
</div>
<div class="AlaOracle">
<img src="http://mywebsite.ru/wp-content/uploads/shutterstock_132379904.jpg" alt="mange l'écran" />
<div>
<div class="Header">
<div>
<div>
Some text
</div>
</div>
</div>
<div class="Body">
<div>
<div>
Some text
</div>
</div>
</div>
</div>
</div>
<div class="AlaOracle Bigger">
<img src="http://mywebsite.ru/wp-content/uploads/shutterstock_132379904.jpg" alt="mange l'écran" />
<div>
<div class="Header">
<div>
<div>
Some text
</div>
</div>
</div>
<div class="Body">
<div>
<div>
Some text
</div>
</div>
</div>
</div>
</div>
<div class="AlaOracle">
<img src="http://mywebsite.ru/wp-content/uploads/shutterstock_132379904.jpg" alt="mange l'écran" />
<div>
<div class="Header">
<div>
<div>
Some text
</div>
</div>
</div>
<div class="Body">
<div>
<div>
Some text<br />
[button link="#" color="orange" size="medium" type="flat" shape="square" target="_parent" title=" Test "] Mode de cuisson [/button]
</div>
</div>
</div>
</div>
</div>
<div class="AlaOracle">
<img src="http://mywebsite.ru/wp-content/uploads/shutterstock_132379904.jpg" alt="mange l'écran" />
<div>
<div class="Header">
<div>
<div>
Some text
</div>
</div>
</div>
<div class="Body">
<div>
<div>
Some text<br />
[button link="#" color="orange" size="medium" type="flat" shape="square" target="_parent" title=" Test "] Mode de cuisson [/button]
</div>
</div>
</div>
</div>
</div>
</div>
Using Flexbox
Compatibility: IE11 and all modern browsers. Safari is supported with the -webkit- prefix.
If the lack of legacy browser support is not a problem, this is a good way to achieve this flexibility without using wrappers or javascript.
Let's make this
The HTML
Couldn't be simpler:
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
The CSS
the body (or a single outer wrapper) is given display: flex, flex-direction: column and flex-wrap: wrap so that the flex items will wrap themselves into columns. It is given an appropriate min and max width and is centered with margin: 0 auto
the divs are given flex: 1 1 50% this tells the div to have a default value of 50% and allow it to grow and shrink, even with a pixel value.
the middle column is given flex: 1 1 100% and it will be twice as tall. It can easily be selected using just nth-child(3)
Here is an excellent guide over on CSS Tricks.
Complete Example
body {
height: 50vh;
display: flex;
flex-direction: column;
flex-wrap: wrap;
margin: 0;
max-width: 1000px;
min-width: 300px;
margin: 0 auto;
}
body > div {
background: #F00;
flex: 1 1 50%;
}
body > div:nth-child(odd) {
background: #F90;
}
body > div:nth-child(3) {
flex: 1 1 100%;
margin: 0 20px;
background: purple;
}
<div>top left</div>
<div>bottom left</div>
<div>middle</div>
<div>top right</div>
<div>bottom right</div>
Maybe something like this?
div.one {
background-color: #f00;
width: 200px;
height: 200px;
}
div.two {
background-color: #0f0;
width: 200px;
height: 200px;
}
div.group-one {
float: left;
}
div.group-two {
float: left;
}
div.three {
background-color: #00f;
width: 200px;
height: 400px;
}
div.group-three {
float: left;
}
div.four {
background-color: #ff0;
width: 200px;
height: 200px;
}
div.five {
background-color: #0ff;
width: 200px;
height: 200px;
<div class="group-one">
<div class="one"></div>
<div class="two"></div>
</div>
<div class="group-two">
<div class="three"></div>
</div>
<div class="group-three">
<div class="four"></div>
<div class="five"></div>
</div>
I've the following HTML and CSS structure.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style type="text/css" media="screen">
/* #Skeleton - Base 960 Grid
================================================== */
.container { position: relative; width: 960px; margin: 0 auto; padding: 0; }
.container .column,
.container .columns { float: left; display: inline; margin-left: 0px; margin-right: 0px;}
.row { margin-bottom: 20px; }
/* Nested Column Classes */
.column.alpha, .columns.alpha { margin-left: 0; }
.column.omega, .columns.omega { margin-right: 0; }
/* Base Grid */
.container .one.column,
.container .one.columns { width: 40px; }
.container .two.columns { width: 100px; }
.container .three.columns { width: 160px; }
.container .four.columns { width: 220px; }
.container .five.columns { width: 280px; }
.container .six.columns { width: 340px; }
.container .seven.columns { width: 400px; }
.container .eight.columns { width: 460px; }
.container .nine.columns { width: 520px; }
.container .ten.columns { width: 580px; }
.container .eleven.columns { width: 640px; }
.container .twelve.columns { width: 700px; }
.container .thirteen.columns { width: 760px; }
.container .fourteen.columns { width: 820px; }
.container .fifteen.columns { width: 880px; }
.container .sixteen.columns { width: 920px; } /* was 940px */
.container .one-third.column { width: 300px; }
.container .two-thirds.column { width: 620px; }
/* Offsets */
.container .offset-by-one { padding-left: 60px; }
.container .offset-by-two { padding-left: 120px; }
.container .offset-by-three { padding-left: 180px; }
.container .offset-by-four { padding-left: 240px; }
.container .offset-by-five { padding-left: 300px; }
.container .offset-by-six { padding-left: 360px; }
.container .offset-by-seven { padding-left: 420px; }
.container .offset-by-eight { padding-left: 480px; }
.container .offset-by-nine { padding-left: 540px; }
.container .offset-by-ten { padding-left: 600px; }
.container .offset-by-eleven { padding-left: 660px; }
.container .offset-by-twelve { padding-left: 720px; }
.container .offset-by-thirteen { padding-left: 780px; }
.container .offset-by-fourteen { padding-left: 840px; }
.container .offset-by-fifteen { padding-left: 900px; }
/* #Site Styles
================================================== */
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body {
font-size: 100%;
font-family: Arial, sans-serif;
}
.border-top {
border-top: 1px solid black;
}
.border-right {
border-right: 1px solid black;
}
.border-bottom {
border-bottom: 1px solid black;
}
.border-left {
border-left: 1px solid black;
}
img {
width: 20%;
}
.blue-background {
background-color: #e1eaf5;
}
#photo-box {
position: absolute;
width: 150px;
height: 150px;
border: 1px solid black;
right: 40px;
top: 150px
}
#last-element {
margin-bottom: 30px;;
}
/* #Typography
================================================== */
h1 {
font-size: 24px;
}
p {
font-size: 16px;
padding-left: 3px;
}
em {
font-size: 12px;
}
.bold-text {
font-weight: 700;
}
.centered-text {
text-align: center;
}
.yellow-text {
background-color: #faff00;
}
</style>
</head>
<body>
<div class="container">
<div class="sixteen columns centered-text">
<h1>Erasmus / Exchange Öğrenci Başvuru Formu</h1>
</div>
<div class="twelve columns">
<img src="images/yeditepe-logo.png" alt="Yeditepe Logo" class="yeditepeLogo" />
</div>
<div class="four columns">
<p class="bold-text">YEDITEPE UNIVERSITY</p>
<em>OUTGOING PROGRAM</em>
</div>
<div class="sixteen columns">
<div id="photo-box" class="centered-text">
<p>PHOTO</p>
<em>resim ekleyiniz</em>
</div>
</div>
<div class="sixteen columns centered-text bold-text">
<p>OUTGOING</p>
<p>LLP - ERASMUS EXCHANGE / NON-ERASMUS</p>
</div>
<!-- <div class="three columns">
<p> </p>
</div> -->
<div class="sixteen columns bold-text centered-text">
<p>Applying for: Fall Term 20 Spring Term 20</p>
</div>
<div class="sixteen columns blue-background bold-text">
<p>1. PERSONAL INFORMATION</p>
</div>
<div class="eight columns border-top border-right border-bottom border-left">
<p>First Name:</p>
<p>Middle Name:</p>
</div>
<div class="eight columns border-top border-right border-bottom">
<p>Family Name:</p>
<p> </p>
</div>
<div class="eight columns border-right border-bottom border-left">
<p>Place of Birth: City or Town / Country</p>
<p> </p>
<p> </p>
<p> </p>
</div>
<div class="eight columns border-right border-bottom">
<p>Do you have a passport? ( ) yes ( ) no</p>
<p>Passport Country:</p>
<p>Passport No:</p>
<p><span class="yellow-text">Passport No:</span></p>
</div>
<div class="eight columns border-right border-bottom border-left">
<p>Female ( ) Male ( )</p>
</div>
<div class="eight columns border-right border-bottom">
<p>Date of Birth<em>(dd/mm/yy)</em>:</p>
</div>
<div class="sixteen columns border-right border-bottom border-left">
<p>T.C. Kimlik Numarası:</p>
</div>
<div class="five columns border-bottom border-left">
<p>Contact Address:</p>
<p>City:</p>
</div>
<div class="eleven columns border-right border-bottom">
<p> </p>
<p>Postal Code:</p>
</div>
<div class="eight columns border-right border-bottom border-left">
<p class="bold-text">Student Contact Tel</p>
<p>GSM:</p>
<p>Home Number:</p>
<p>E-mail:</p>
<p> </p>
</div>
<div class="eight columns border-right border-bottom">
<p class="bold-text">Parent Contact Tel</p>
<p>GSM:</p>
<p>Home Number:</p>
<p>E-mail:</p>
<p>E-mail:</p>
</div>
<div class="sixteen columns blue-background centered-text">
<p>Write year and circle the semester</p>
</div>
<div class="sixteen columns">
<p> </p>
</div>
<div class="sixteen columns blue-background bold-text">
<p>2. ACADEMIC HISTORY AT YEDITEPE UNIVERSITY</p>
</div>
<div class="eight columns border-top border-left">
<p>Your Department:</p>
<p>Current CGPA:</p>
</div>
<div class="eight columns border-top border-right">
<p>* Subject Area Code: </p>
<em>(select from the list on page 3)</em>
</div>
<div class="sixteen columns border-right border-left">
<p><span class="bold-text">Attach one photocopy of your recent transcript with this form:</span> applications submitted without transcripts attached will not be evaluated.</p>
</div>
<div class="sixteen columns border-right border-bottom border-left">
<p>Are you on scholarship at Yeditepe? <em>Burslu öğrenci statüsünde misiniz?</em> ( ) Yes ( ) No</p>
</div>
<div class="sixteen columns">
<p> </p>
</div>
<div class="sixteen columns blue-background bold-text">
<p>3. HOST UNIVERSITY DETAILS</p>
</div>
<div class="sixteen columns">
<em>Please write the name of the university and country of the exchange program to which you are applying for</em>
</div>
<div class="sixteen columns blue-background border-top border-right border-left">
<p>1st Choice</p>
</div>
<div class="sixteen columns border-right border-left">
<p>Official Name of the University: .......................................................................................................... Erasmus ID Code: </p>
</div>
<div class="eight columns border-left">
<p>City:</p>
</div>
<div class="eight columns border-right">
<p>Country:</p>
</div>
<div class="sixteen columns border-right border-left">
<p>Contact e-mail for their international office: </p>
</div>
<div class="sixteen columns border-right border-left">
<p>Program of Study: .................................................................................................................................................................................................</p>
</div>
<div class="sixteen columns blue-background border-right border-left">
<p>2nd Choice</p>
</div>
<div class="sixteen columns border-right border-left">
<p>Official Name of the University: .......................................................................................................... Erasmus ID Code: </p>
</div>
<div class="eight columns border-left">
<p>City:</p>
</div>
<div class="eight columns border-right">
<p>Country:</p>
</div>
<div class="sixteen columns border-right border-left">
<p>Contact e-mail for their international office: </p>
</div>
<div class="sixteen columns border-right border-bottom border-left">
<p>Program of Study: .................................................................................................................................................................................................</p>
</div>
<div class="sixteen columns centered-text bold-text">
<p>Erasmus / Exchange Öğrenci Başvuru Formu</p>
</div>
<div class="sixteen columns border-top border-right border-bottom border-left">
<p>Program of Study ..............................................................................................................................................................................................</p>
</div>
<div class="sixteen columns centered-text bold-text">
<p>International study programs for a student to study abroad for one semester cost estimate is between 1500€ - 5000€ (euro) for transportation, housing, insurance, books, food, etc.</p>
</div>
<div class="four columns">
<p>( ) yes ( ) no</p>
</div>
<div class="twelve columns">
<p>Will you be able to financially support your semester abroad?</p>
<em>Yurt dışında geçireceğiniz semestre in maliyetini karşılayabilecek misiniz?</em>
</div>
<div class="four columns">
<p>( ) yes ( ) no</p>
</div>
<div class="twelve columns">
<p>Does your family agree with your decision to study abroad?</p>
<em>Aileniz yurt dışında bir semestre eğitim görme kararınız için izin veriyorlar rmı?</em>
</div>
<div class="four columns">
<p>( ) yes ( ) no</p>
</div>
<div class="twelve columns">
<p>Do you agree to provide the necessary documents to the International Office at Yeditepe in good order and on time?</p>
<em>Gereki dokümanları içeren dosyayı tam olarak ve zamanında Uluslararası Ofise teslim etmeyi kabul ediyor musunuz?</em>
</div>
<div class="four columns">
<p>( ) yes ( ) no</p>
</div>
<div class="twelve columns">
<p>Do you agree to go on your own to the appropriate consulate in good time with the required documents in order to obtain a visa?</p>
<em>Vize almak için gereken durumlarda konsolosluğa giderek vize işlemlerini kendiniz yapmayı kabul ediyor musunuz?</em>
</div>
<div class="sixteen columns">
<p class="bold-text">If you have answered ‘yes’ to all the above questions: <em>Yukarıdaki soruların hepsine ‘Evet’ yanıtı verdiniz ise</em></p>
</div>
<div class="sixteen columns">
<p>Do you understand that by agreeing to these commitments, if you are selected into a study abroad program, you agree to assume the responsibility of satisfying all financial requirements, presenting your documents and obtaining a visa, meeting deadlines, and fulfilling in general all obligations set forth by the regulations of the designated by the international study program?</p>
<em>Bu konularda gerekenleri yapmayı taahüt etmiş olarak öğrenci değişim programına kabul edilmeniz halinde bu program çerçevesinde belirtilen şartlara göre; mali gereksinimleri karşılamayı, gerekli dokümanları sunmayı, vizeyi almayı, program takvimine uymayı, genel şartları yerine getirmeyi taahhüt ediyormusunuz?</em>
</div>
<div class="sixteen columns centered-text">
<h1 class=""bold-text>( ) yes ( ) no</h1>
</div>
<div class="sixteen columns">
<p>I certify that the information given in this application is true, complete, and accurate to the best of my knowledge.</p>
<em>Bu başvuruda verdiğim bilgilerin hakikate uygun, tam, ve doğru olduğunu beyan ederim</em>
</div>
<div class="sixteen columns bold-text">
<p>Yeditepe University Student Registration ID Number:</p>
</div>
<div class="ten columns bold-text">
<p>Student’s Signature:</p>
</div>
<div class="six columns">
<p>Date<em>(dd/mm/yy)</em>:</p>
</div>
<div class="sixteen columns centered-text bold-text">
<p>TO BE COMPLETED by the Department Coordinator</p>
</div>
<div class="sixteen columns">
<p>_____ I have met with the student</p>
</div>
<div class="sixteen columns">
<p>_____ It has been discussed with the student if English is not the language of instruction; the student satisfies the level of language proficiency required by the host school in order to succeed in his/her courses</p>
</div>
<div class="sixteen columns">
<p>_____ I have informed the student of credits and any subject requirements needed to satisfy a full-load course curriculum during the period of studying abroad.</p>
</div>
<div class="sixteen columns centered-text bold-text">
<p>SUBMIT THIS COMPLETED FORM TO YOUR DEPARTMENT ERASMUS COORDINATOR</p>
</div>
<div class="sixteen columns border-top border-right border-left bold-text">
<p>Coordinator’s Name (full name printed):</p>
</div>
<div class="ten columns border-left bold-text">
<p>E-mail:</p>
</div>
<div class="six columns border-right bold-text">
<p>University Tel:</p>
</div>
<div class="ten columns border-bottom border-left bold-text">
<p>Department Coordinator Signature</p>
</div>
<div class="six columns border-right border-bottom bold-text" id="last-element">
<p>Date<em>(dd/mm/yy)</em>:</p>
</div>
</div><!-- container -->
<!-- End Document
================================================== -->
</body>
</html>
This structure is used in a CodeIgniter project with DomPDF to convert the structure into PDF.
The process happens successfully in terms of PDF creation but the representation of the PDF is utterly different from the expected CSS.
Here's an example PDF.
What is causing this? And how can I fix this?
Do you know the width of your PDF document (minus margins)?
As the Outgoing text is supposed to be centered, it is apparent that your HTML is much wider than the PDF document.
What version of DOMPDF are you using? The CSS float property is only supported from version 0.6.0 and on, and is disabled by default. use DOMPDF_ENABLE_CSS_FLOAT in the config to enable it.
Instead of setting widths in px, try using percentages.
.container .eight.columns {
width: 50%;
}
This is probably a pretty basic question, but I have a banner with an image on the left and text on the right. Under the banner is just a block of color. When the page gets smaller, my expectation is that the bits in the banner would stack (maintaining the background color for both) and the block of color (class="blue-line") would fall beneath them.
Here is the mark-up:
<section>
<div class="row header">
<div class="col-sm-6">
<img src="../images/logo.png" height="100px" />
</div>
<div class="col-sm-6 title">
<h2>Some Title Text</h2>
</div>
</div>
<div class="row">
<div class="col-sm-12 blue-line"></div>
</div>
</section>
and the css
.header {
background-color: #F2EBCC;
border: 10px solid #F2EBCC;
height: 120px;
}
.row > .title {
text-align: right;
top: 45%;
}
Thanks in advance!
JSFiddle: http://jsfiddle.net/3n6Kd/
try this:
<section>
<div class="row header">
<div class="col-sm-6">
<img src="../images/logo.png" height="100px" />
</div>
<div class="col-sm-6 title">
<h2>Some Title Text</h2>
</div>
</div>
<div class="row">
<div class="col-sm-12 blue-line"></div>
</div>
and:
.header {
background-color: #F2EBCC;
height: 120px;
}
.title {
text-align: right;
display: block;
padding: 10px;
}
.blue-line {
margin-top:10px;
height: 15px;
background-color: blue;
}
the text go under the first column not the blue-line, but it seems to appear above the blue-line so try it in your computer because some time jsfiddle.net don't show code correctly.
hope it will help you.