MPDF Not displaying correct CSS - php

//this is the code at the page that generates pdf
$string = get_include_contents('pdf/draydocument/index.php');
//print_r($string);
$mpdf=new mPDF();
$mpdf->WriteHTML($string);
$mpdf->SetDisplayMode('fullpage');
$mpdf->Output();
.heading {
font-family: Montserrat, sans-serif;
}
.body {
margin-top: 29px;
padding-top: 0px;
background-color: #fff;
font-family: 'Varela Round', sans-serif;
font-weight: 500;
}
.text-block {
font-family: Montserrat, sans-serif;
}
.text-block-2 {
font-size: 25px;
}
.text-field {
margin-right: -453px;
padding-right: 0px;
font-size: 11px;
}
.bold-text {
display: block;
margin-right: 1200px;
border: 1px solid #000;
border-radius: 9px;
color: #ffa705;
}
.paragraph {
width: 60%;
margin-right: 1200px;
margin-left: auto;
}
.div-block {
margin: -144px 0px 1px 1200px;
}
.text-block-3 {
width: 50%;
margin-right: 300px;
margin-left: -600px;
}
.heading-2 {
margin-top: 200px;
}
.heading-3 {
width: 40%;
margin-top: 117px;
margin-right: 400px;
margin-left: -32px;
color: #ffa705;
font-size: 25px;
}
.grid {
grid-template-areas: "Area";
}
.columns {
width: 35%;
border: 1px none #000;
}
.column {
border: 1px solid #000;
}
.column-2 {
border: 1px solid #000;
}
.column-3 {
border: 1px solid #000;
}
.column-4 {
border: 1px solid #000;
}
.column-5 {
border: 1px solid #000;
}
.column-6 {
border: 1px solid #000;
}
.column-7 {
border: 1px solid #000;
}
.column-8 {
border: 1px solid #000;
}
.column-9 {
border: 1px solid #000;
}
.column-10 {
border: 1px solid #000;
}
.column-11 {
border: 1px solid #000;
}
.column-12 {
border: 1px solid #000;
}
.column-13 {
padding-left: 0px;
}
.columns-2 {
padding-right: 0px;
}
.column-14 {
padding-right: 35px;
}
.column-15 {
height: auto;
margin-top: 0px;
}
.columns-3 {
height: 30px;
padding-top: 0px;
padding-bottom: 0px;
}
.column-16 {
height: 30px;
}
.column-17 {
height: 30px;
}
.column-18 {
border: 1px solid #000;
}
.column-19 {
border: 1px solid #000;
}
.column-20 {
border: 1px solid #000;
}
.column-21 {
height: 400px;
border: 1px solid #000;
}
.column-22 {
height: 400px;
border: 1px solid #000;
}
.column-23 {
height: 400px;
border: 1px solid #000;
}
.image {
width: 600px;
}
.div-block-2 {
width: 60px;
}
.text-block-4 {
width: 40%;
margin-left: -600px;
}
.columns-4 {
width: 35%;
}
.columns-5 {
width: 35%;
}
.columns-6 {
width: 35%;
}
.columns-7 {
width: 35%;
}
.columns-8 {
width: 35%;
}
.text-block-5 {
font-size: 10px;
}
.bold-text-2 {
font-size: 10px;
}
.bold-text-3 {
font-size: 10px;
}
<!DOCTYPE html>
<!-- This site was created in Webflow. http://www.webflow.com -->
<!-- Last Published: Fri Nov 08 2019 22:38:51 GMT+0000 (UTC) -->
<html data-wf-page="5dc492ebb03ec1759b3c5d8c" data-wf-site="5dc492ebb03ec16cc23c5d8b">
<head>
<meta charset="utf-8">
<title>Delivery Order</title>
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="Webflow" name="generator">
<link href="http://freightcube.net/pdf/draydocument/css/normalize.css" rel="stylesheet"/>
<link href="http://freightcube.net/pdf/draydocument/css/webflow.css" rel="stylesheet"/>
<link href="css/normalize.css" rel="stylesheet" type="text/css">
<link href="css/webflow.css" rel="stylesheet" type="text/css">
<link href="css/puneets-blank-site-1bae2e.webflow.css" rel="stylesheet" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js" type="text/javascript"></script>
<script type="text/javascript">WebFont.load({ google: { families: ["Montserrat:100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic","Varela Round:400"] }});</script>
<!-- [if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js" type="text/javascript"></script><![endif] -->
<script type="text/javascript">!function(o,c){var n=c.documentElement,t=" w-mod-";n.className+=t+"js",("ontouchstart"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+"touch")}(window,document);</script>
<link href="" rel="shortcut icon" type="image/x-icon">
<link href="" rel="apple-touch-icon">
</head>
<body class="body">
<div class="div-block-2"></div>
<p class="paragraph">123 E 9TH ST, SUITE 332<br>UPLAND, CA 91786<br>PHONE: 909-285-2370<br>EMAIL: ops#freightcube.net</p>
<h1 class="heading-3"> DRAYAGE DELIVERY ORDER</h1>
<div class="columns w-row">
<div class="column w-col w-col-4">
<h6>OCEAN CARRIER/SSL :<br>php code</h6>
</div>
<div class="column-2 w-col w-col-4">
<h6>LOCATION/TERMINAL :<br>php code</h6>
</div>
<div class="column-3 w-col w-col-4">
<h6>PORT :<br>php code</h6>
</div>
</div>
<div class="columns-4 w-row">
<div class="column-4 w-col w-col-4">
<h6>MASTER BOL :<br>PHP</h6>
</div>
<div class="column-5 w-col w-col-4">
<h6>ARRIVAL DATE/CUT OFF DATE :<br>PHP</h6>
</div>
<div class="column-6 w-col w-col-4">
<h6>TRUCKING COMPANY:<br>PHP</h6>
</div>
</div>
<div class="columns-5 w-row">
<div class="column-7 w-col w-col-3">
<h6>CONTAINER :<br>PHP</h6>
</div>
<div class="column-8 w-col w-col-3">
<h6>HOUSE BOL :<br>PHP</h6>
</div>
<div class="column-9 w-col w-col-3">
<h6>ENTRY NO :<br>PHP</h6>
</div>
<div class="column-10 w-col w-col-3">
<h6>CUSTOMER REFERENCE :<br>PHP</h6>
</div>
</div>
<div class="columns-6 w-row">
<div class="column-11 w-col w-col-6">
<h6>DELIVERY/PICKUP ADDRESS:<br>PHP</h6>
</div>
<div class="column-12 w-col w-col-6">
<h6>SPECIAL INSTRUCTIONS:<br>PHP</h6>
</div>
</div>
<div class="columns-7 w-row">
<div class="column-18 w-col w-col-3">
<h6>NO. OF PKGS</h6>
</div>
<div class="column-19 w-col w-col-6">
<h6>DESCRIPTION OF GOODS</h6>
</div>
<div class="column-20 w-col w-col-3">
<h6>WEIGHT</h6>
</div>
</div>
<div class="columns-8 w-row">
<div class="column-21 w-col w-col-3">
<div class="text-block-5"><strong>PHP CODE FOR NO. OF PACKAGES</strong></div>
</div>
<div class="column-22 w-col w-col-6">
<div><strong class="bold-text-2">PHP FOR DISCRIPTION</strong></div>
</div>
<div class="column-23 w-col w-col-3">
<div><strong class="bold-text-3">PHP FOR WEIGHT</strong></div>
</div>
</div>
<h4>RECEIVED IN GOOD ORDER BY :<br>‍</h4>
<script src="https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.4.1.min.220afd743d.js" type="text/javascript" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="js/webflow.js" type="text/javascript"></script>
<!-- [if lte IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/placeholders/3.0.2/placeholders.min.js"></script><![endif] -->
</body>
</html>
link to codeI am using mpdf for my php application to generate pdf pages. I recently generated an html page using a drag and drop html builder which also provides source code with css. so i copied the exact css on the page using . When mpdf generates the pdf it is not showing css correctly. it looks like width issues but i tried to reduce width of all divs and still encounter the same problem just with smaller appearing columns. please help. here is how it shows and how it should show

mPDF has limited abilities in handling floated blocks. Use a HTML table to make sure it is displayed correctly (your data is somewhat tabular, so it is the right thing to do anyway).

Related

Problem with wordpress managing my custom pages content

I have a problem that, like I wrote at title, though its because wordpress.
Im working with a basic wordpress theme but I made my own header, my own footer and my own pages.
Heres my header:
<body>
<div class="wrapper">
<header>
<script src="<?php echo get_stylesheet_directory_uri(); ?>/assets/js/scriptmain.js" type="text/javascript"></script>
<nav>
<div class="menu-icon">
<i class="fa fa-bars fa-2x"></i>
</div>
<div class="logo">
ArvanJobs
</div>
<?php
wp_nav_menu( array(
'theme location' => 'top',
'container' => 'div',
'container_class' => 'menu',
));
?>
</nav>
</header>
And here's the footer:
<?php
/**
*
* #link arvanjobs.com
*
* #package Klmfsk
*/
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Footer</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Playfair+Display:400,700,900" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700" rel="stylesheet">
</head>
<footer class="container-fluid bg-grey py-5">
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-6 ">
<div class="logo-part">
<img src="http://localhost/wordpress/wp-content/themes/twentytwentyone-child/img/logo.png" class="w-50 logo-footer" >
<p>7637 Laurel Dr. King Of Prussia, PA 19406</p>
<p>Use this tool as test data for an automated system or find your next pen</p>
</div>
</div>
<div class="col-md-6 px-4">
<h6> About Company</h6>
<p>But horizontal lines can only be a full pixel high.</p>
More Info <br>
Contact Us
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-6 px-4">
<h6> Help us</h6>
<div class="row ">
<div class="col-md-6">
<ul>
<li> Home </li>
<li> About </li>
<li> Service </li>
<li> Team </li>
<li> Help </li>
<li> Contact </li>
</ul>
</div>
<div class="col-md-6 px-4">
<ul>
<li> Cab Faciliy </li>
<li> Fax </li>
<li> Terms </li>
<li> Policy </li>
<li> Refunds </li>
<li> Paypal </li>
</ul>
</div>
</div>
</div>
<div class="col-md-6 ">
<h6> Newsletter</h6>
<div class="social">
<i class="fa fa-facebook" aria-hidden="true"></i>
<i class="fa fa-instagram" aria-hidden="true"></i>
</div>
<p>That's technology limitation of LCD monitors</p>
</div>
</div>
</div>
</div>
</div>
</div>
<?php wp_footer(); ?>
</body>
</html>
Then, my method is:
1- To make a new wp page. Named for example: Index.
2-Make a page-index.php and I code there calling the header and the footer.
U can se at arvanjobs.com. I made a page-index.php, and I code this: (and works fine.)
<?php get_header(); ?>
<div class="main-container">
<div class="item1 cnt">
<video id="vid" src="http://localhost/wordpress/wp-content/themes/twentytwentyone-child/img/coffee1.mp4" width="1920" height="1080" autoplay loop muted type="video/mp4"> </video>
</div>
<div class="item2 cnt">
<p style="font-size:50px; color:white;"> Join Us! </P>
<button type="button" class="btn btn-outline-warning" style="font-family:forum; font-weight:bold; background-color:transparent; border-radius: 3px; color:yellow; font-size:50px; border: 2px solid yellow;">Warning</button>
</div>
<div class="item3 cnt">
<img src="http://localhost/wordpress/wp-content/themes/twentytwentyone-child/img/logo.png" />
</div>
<div class="item4 cnt">
</div>
<div class="item5 cnt">
<h4>WHO WE ARE?</h4>
<p>
ArvanJobs is above all peace of mind. It is a new way
of working, of traveling, of training, of advancing in
your career. Whether you are a company looking for
workers or you are looking for a new job
opportunity, ArvanJobs will always be by your side,
selecting the best workers and the best companies
that will boost your career.
</p>
</div>
<div class="item6 cnt">
<h4>WHY WORK WITH US?</h4>
<p>
For our personal treatment, our advice, and above
all for our experience working in hotels in
numerous countries.
Because we know how difficult it is to take that step
of daring to work in a foreign country. Because we
know how hard it is to find the right staff.
</p>
</div>
<div class="item7 cnt">
</div>
<div class="item8 cnt">
<img src="http://localhost/wordpress/wp-content/themes/twentytwentyone-child/img/arvan3.jpg">
</div>
<div class="item9 cnt">
<h4>HOW WE WORK?</h4>
<p>
All candidates are interviewed by staff who have
worked in hotels, not offices
The same happens with our clients who have to
satisfy a series of criteria and guarantees for the
worker to work with us.</p>
</div>
<div class="item10 cnt">10</div>
<div class="item11 cnt">
<img src="http://localhost/wordpress/wp-content/themes/twentytwentyone-child/img/arvan2.jpg" />
</div>
<div class="item12 cnt">
<img src="http://localhost/wordpress/wp-content/themes/twentytwentyone-child/img/arvan4.jpg" />
</div>
<div class="item13 cnt">
<!--<img src="http://localhost/wordpress/wp-content/themes/twentytwentyone-child/img/arvan3.jpg" />-->
</div>
</div>
<?php get_footer(); ?>
As u can see at arvanjobs.com, the header is at top, the footer at bottom...well, nice. Then I do THE SAME EXACTLY THING, I make a wp page called "Candidates", then I make a .php called "page-candidates.php" with this:
<?php get_header(); ?>
<body>
<div class="bg">
<section class="form">
<div class="formwrap">
<form method="POST" id="Form" action="https://www.arvanjobs.com/wp-content/themes/astra/registered.php" enctype="multipart/form-data">
<h4>My short CV</h4>
<label for="lastname">Last name:</label>
<input class="controls" type="text" name="lname" id="lname" placeholder="Ex: Sorribes" required="">
<label for="name">Name:</label>
<input class="controls" type="text" name="name" id="name" placeholder="Ex: Pablo" required="">
<label for="bcountry">Country of birth:</label>
<select id="bcountry" name="bcountry" class="date" placeholder="Ex: Spain" required="">
</select>
<div>
<label for="email">Email:</label>
<input class="controls" type="email" name="email" id="email" placeholder="Ex: pablo#sorribes.com" required="">
</div>
<div>
<label for="phone">Phone number</label><br>
<input type="tel" id="phone" name="phone" maxlength="12" required="">
</div>
<!-- country codes (ISO 3166) and Dial codes. -->
<select name="countryCode" id="prefix">
<option data-countrycode="ES" value="34" selected="">ES (+34)</option>
<option data-countrycode="US" value="1">USA (+1)</option>
<optgroup label="Other countries">
</optgroup>
</select>
<div>
<label for="date">Birthday</label>
<input class="date" type="date" name="date" id="date" required="">
</div>
<label for="jcountries">Where do you wanna work?:</label>
<div class="jcountries" id="countrys">
<div class="left">
<div>
<input type="checkbox" id="ireland" name="jcountries[]" value="ireland">
<label for="ireland">Ireland</label>
</div>
<div>
<input type="checkbox" id="iceland" name="jcountries[]" value="iceland">
<label for="iceland">Iceland</label>
</div>
</div>
</div>
<label for="jobs">What kind of job do you want?:</label>
<div class="jcountries" id="job">
<div class="left">
<div>
<input type="checkbox" id="reception" name="jobs[]" value="reception">
<label for="reception">Reception</label>
</div>
<div>
<input type="checkbox" id="housekeeping" name="jobs[]" value="housekeeping">
<label for="housekeeping">Housekeeping</label>
</div>
</div>
<div class="right right1">
<div>
<input type="checkbox" id="chefs" name="jobs[]" value="chefs">
<label for="chefs">Chefs</label>
</div>
<div>
<input type="checkbox" id="waiters" name="jobs[]" value="waiters">
<label for="waiters">Waiters</label>
</div>
</div>
</div>
<label for="cv">Send your CV</label>
<div class="scv">
<input type="file" id="cv" name="cv" accept=".pdf, .doc, .docx, .docm, .odt, .odf, .odt, .ods, .odp" required="">
</div>
<input class="botons" type="submit" value="Send" onclick="location.href='http://www.google.com'">
</form>
<!--<div class="alert alert-info" style="display: none;"></div>-->
<script src="https://www.arvanjobs.com/wp-content/themes/astra/assets/js/script.js"></script>
<!--<script>
/**Make the plugin location-aware*/
function getIp(callback) {
fetch('https://ipinfo.io/json?token=<your token>', { headers: { 'Accept': 'application/json' }})
.then((resp) => resp.json())
.catch(() => {
return {
country: 'us',
};
})
.then((resp) => callback(resp.country));
}
const phoneInputField = document.querySelector("#phone");
const phoneInput = window.intlTelInput(phoneInputField, {
utilsScript:
"https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/js/utils.js",
});
/**this is the plugin code that converts the selected country code and user input into the international format.*/
const info = document.querySelector(".alert-info");
function process(event) {
event.preventDefault();
const phoneNumber = phoneInput.getNumber();
info.style.display = "";
info.innerHTML = `Phone number in E.164 format: <strong>${phoneNumber}</strong>`;
}
</script>-->
</div>
</section>
</div>
</body>
<?php get_footer(); ?>
U can see at arvanjobs.com/candidates what happen. The footer goes crazy. I cant understand why this happen. Its not because the display grid coz I tried to make a grid 1x1 to put in the form there, but the footer stay like it is absolute positioned :/
And this is my css
* {
font-family: "forum";
font-weight:bold;
}
/*GRID CSS*/
/*GRID header*/
.header-container {
display:grid;
background-color:red;
grid-template-columns: 50% 50%;
font-family: "forum";
font-weight: bold;
}
.header-container div{
text-align:center;
font-family: "forum";
font-weight: bold;
z-index:100000000000000;
}
/*GRID index*/
.main-container {
top:0;
display:grid;
background-image:url('http://localhost/wordpress/wp-content/themes/twentytwentyone-child/img/wal.png');
background-attachment:fixed;
grid-template-columns: 50% 50%;
box-sizing:border-box;
z-index:-1;
}
.main-container > * {
text-align:center;
display:flex;
justify-content:center;
align-items:center;
}
.main-container div {
color:black;
border: px solid black;
}
.main-container video {
display:block;
width:100%;
height:100%;
/* Scale video to container size */
object-fit: cover;
object-position: center;
z-index:10000;
}
.main-container h4 {
color:#edbd87;
}
.main-container p {
color:#1f1f1f;
}
.item1{
grid-column: 1 / 3;
background-color: green;
height:1080px;
}
.item2{
right:0;
left:0;
top:300px;
bottom:0;
position:absolute;
grid-column: 1 / 3;
display:inline-block;
z-index:1000000;
}
.item3{
background:#e0e0e0;
grid-column: 1 / 3;
height:40vh;
border-bottom:1px solid #967b5d;
z-index:100000;
}
.item4 {
background-color:#e0e0e0;
padding:30px;
z-index:9;
width:100%;
height:900px;
}
.item4 img{
padding:15px;
justify-self:center;
display:block;
width:90%;
height:80%;
/* Scale video to container size */
object-fit: cover;
object-position: center;
border-radius: 80px 20px;
z-index:10;
}
.item5{
height:900px;
background-color:#e0e0e0;
align-content:start;
align-items:start;
justify-self:start;
justify-content:right;
justify-items:right;
object-position: right;
padding:100px;
width:80%;
display: inline-grid;
z-index:9;
box-sizing:border-box;
align-content:center;
justify-content:center;
justify-items:center;
align-items:center;
z-index:1000;
}
.item5 * {
width:80%;
display:flex;
margin-right:50px;
margin-left:30px;
font-weight:bold;
}
.item5 p{
margin-top:10px;
font-size: 120%;
}
.item5 h4{
display:flex;
justify-content:center;
align-self:center;
margin-top:20px;
font-weight:bold;
font-size: 340%;
}
.item6{
height:900px;
background-color:#e0e0e0;
align-content:end;
align-items:end;
justify-self:end;
justify-content:right;
justify-items:right;
object-position: right;
padding:100px;
width:80%;
display: inline-grid;
z-index:9;
box-sizing:border-box;
align-content:center;
justify-content:center;
justify-items:center;
align-items:center;
z-index:1000;
}
.item6 * {
width:80%;
display:flex;
margin-right:50px;
margin-left:30px;
font-weight:bold;
}
.item6 p{
margin-top:10px;
font-size: 120%;
}
.item6 h4{
display:flex;
justify-content:center;
align-self:center;
margin-top:20px;
font-weight:bold;
font-size: 340%;
}
.item7 {
height:900px;
padding:30px;
z-index:10;
width:100%;
z-index:10000000;
}
.item7 img{
padding:15px;
justify-self:center;
display:block;
width:90%;
height:80%;
/* Scale video to container size */
object-fit: cover;
object-position: center;
border-radius: 80px 20px;
z-index:10;
}
.item8 {
top:110px;
right:309px;
z-index:1888;
width:100%;
height:900px;
background-color:#e0e0e0;
align-content:start;
align-items:start;
justify-self:start;
justify-content:right;
justify-items:right;
object-position: right;
}
.item8 img{
margin-left:140px;
display:block;
width:71%;
height:63%;
/* Scale video to container size */
object-fit: cover;
object-position: center;
border-radius: 80px 20px;
z-index:1000;
}
.item9{
height:900px;
background-color:#e0e0e0;
align-items:start;
align-content:start;
justify-self:start;
justify-content:start;
justify-items:start;
object-position: left top;
padding:100px;
width:80%;
display: inline-grid;
z-index:9;
box-sizing:border-box;
justify-content:center;
justify-items:center;
align-items:center;
z-index:1000;
}
.item9 * {
width:80%;
display:flex;
margin-right:50px;
margin-left:30px;
font-weight:bold;
}
.item9 p{
margin-top:10px;
font-size: 120%;
}
.item9 h4{
display:flex;
justify-content:center;
align-self:center;
margin-top:20px;
font-weight:bold;
font-size: 340%;
}
.item10{
z-index:100000000;
background-color: orange;
grid-column: 1 / 3;
}
.item11 {
top:110px;
right:309px;
position:fixed;
padding:30px;
z-index:11;
width:100%;
height:800px;
}
.item11 img{
padding:15px;
justify-self:center;
display:block;
width:35%;
height:66%;
/* Scale video to container size */
object-fit: cover;
object-position: center;
border-radius: 80px 20px;
z-index:1000;
}
.item12 {
top:110px;
left:309px;
position:fixed;
padding:30px;
z-index:9;
width:100%;
height:800px;
z-index:100;
}
.item12 img{
padding:15px;
justify-self:center;
display:block;
width:35%;
height:66%;
/* Scale video to container size */
object-fit: cover;
object-position: center;
border-radius: 80px 20px;
}
.item13 {
top:110px;
right:309px;
position:fixed;
padding:30px;
z-index:16;
width:100%;
height:800px;
}
.item13 img{
padding:15px;
justify-self:center;
display:block;
width:35%;
height:66%;
/* Scale video to container size */
object-fit: cover;
object-position: center;
border-radius: 80px 20px;
z-index:1000;
}
/*CSS*/
html, body {
margin: 0;
padding: 0;
width: 100%;
height:100%;
font-family: "forum";
font-weight: bold;
}
header {
position:absolute;
width: 100%;
height:80px;
z-index:100000000000000;
}
}
.content {
width: 100%;
font-size: 20px;
line-height: 30px;
text-align: justify;
}
.logo {
line-height: 60px;
position:fixed;
float: left;
margin: 16px 46px;
color: #fff;
font-family:"Forum";
font-weight: bold;
font-size: 25px;
letter-spacing: 2px;
}
nav {
position: fixed;
width: 100%;
line-height: 60px;
}
nav ul {
line-height: 60px;
list-style: none;
background: rgba(0, 0, 0, 0);
overflow: hidden;
color: transparent;
padding: 0;
text-align: right;
margin: 0;
padding-right: 40px;
transition: 1s;
}
nav.black ul {
background: #000;
}
nav ul li {
display: inline-block;
padding: 16px 40px;;
}
nav ul li a {
text-decoration: none;
color: #fff;
font-size: 16px;
}
.menu-icon {
line-height: 60px;
width: 100%;
background: #000;
text-align: right;
box-sizing: border-box;
padding: 15px 24px;
cursor: pointer;
color: #fff;
display: none;
}
login
.loginform {
position:relative;
}
/*footer*/
.w-50 {
width: 100%!important;
}
.bg-grey {
background: #edbd87;
}
.logo-footer {
margin-bottom: 40px;
}
footer {
z-index:1000000000;
position:relative;
color: #1f1f1f;
}
footer p, a {
font-weight:bold;
font-size: 12px;
font-family: 'Forum', sans-serif;
}
footer h6 {
font-family: 'Forum', serif;
margin-bottom: 40px;
position: relative;
font-weight:bold;
}
footer h6:after {
position: absolute;
content: "";
background: #1f1f1f;
width: 12%;
height: 1px;
left: 0;
bottom: -20px;
}
.btn-footer {
font-weight:bold;
color: #1f1f1f;
text-decoration: none;
border: 1px solid;
border-radius: 43px;
font-size: 13px;
padding: 7px 30px;
line-height: 47px;
}
.btn-footer:hover {
font-weight:bold;
text-decoration: none;
}
.form-footer input[type="text"] {
font-weight:bold;
border: none;
border-radius: 16px 0 0 16px;
outline: none;
padding-left: 10px;
}
::placeholder {
font-weight:bold;
font-size: 10px;
padding-left: 10px;
font-style: italic;
}
.form-footer input[type="button"] {
border: none;
background:#1f1f1f;
margin-left: -5px;
color: #fff;
outline: none;
border-radius: 0 16px 16px 0;
padding: 2px 12px;
}
.social .fa {
font-weight:bold;
color: #1f1f1f;
font-size: 22px;
padding: 10px 15px;
background: #967b5d;
}
footer ul li {
font-weight:bold;
list-style: none;
display: block;
}
footer ul {
padding-left: 0;
}
footer ul li a{
text-decoration: none;
color: #1f1f1f;
text-decoration:none;
}
a:hover {
text-decoration: none;
color: #967b5d !important;
}
.logo-part {
font-weight:bold;
border-right: 1px solid #1f1f1f;
height: 100%;
}
#media(max-width: 786px) {
.logo {
position: fixed;
top: 0;
margin-top: 16px;
}
nav ul {
max-height: 0px;
background: #000;
}
nav.black ul {
background: #000;
}
.showing {
max-height: 34em;
}
nav ul li {
box-sizing: border-box;
width: 100%;
padding: 24px;
text-align: center;
}
.menu-icon {
display: block;
}
}
#media all and (max-width: 1400px) {
.main-container div {
grid-column: 1 / span 3;
}
}
/*form*/
/*fondo*/
.bg {
height:600px;
position:absolute;
width:100%
word-wrap: break-word;
background-image:url(' https://www.arvanjobs.com/wp-content/uploads/2022/02/manitas.jpg');
background-position:center;
background-attachment:fixed;
opacity:70%;
padding-top:20px;
padding-bottom:40px;
z-index:-1;
display:grid;
grid-template-columns: 100%;
box-sizing:border-box;
z-index:-1;
height:100vh;
}
.bg2 {
position:relative;
width:100%
word-wrap: break-word;
background-image:url(' https://www.arvanjobs.com/wp-content/uploads/2022/02/manitas.jpg');
background-attachment: fixed;
opacity:70%;
padding-top:20px;
padding-bottom:40px;
z-index:-1;
}
.formwrap {
height:600px;
border:1px solid #967b5d;
padding:30px;
border-radius: 4px;
background: #fff;
}
Ive tried too to make a template for solve this. I made this blank template:
<?php /* Template Name: Blank*/ ?>
<?php
get_header();
?>
<?php
get_template_part( 'template-parts/content/content-page' );
?>
</div>
<?php
get_footer();
?>
Well, if i choose this template when I make a new wp page, it will only show the header and the footer, no content. (for every pages) I have to choose "Default template" for things working. What happen here? Why at page-index.php the footer is working fine, but when i do the same with other page the footer stay at top? Any suggestion? Thanks!

Unable to scroll -

Simply trying to get my page to scroll, simply added 'br' to test. This can be seen in the file below -
<?php
session_start();
if (isset($_GET['logout'])) {
session_destroy();
unset($_SESSION['username']);
header("location: login.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>Menu Flexbox</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-hQpvDQiCJaD2H465dQfA717v7lu5qHWtDbWNPvaTJ0ID5xnPUlVXnKzq7b8YUkbN" crossorigin="anonymous">
<link rel="stylesheet" href="css/style6.css">
<link rel="shortcut icon" href="images/icons/favicon.png" />
<link href='http://fonts.googleapis.com/css?family=Hind:400,300,600,500,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/style9.css">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="js/index.js"></script>
</head>
<body>
<div class="row">
<div class="col-md-2">
<div class="table" id="main">
<div class="table-cell">
<div class="menu">
<div class="menu-item"><i class="fa fa-home"></i><span>Home</span></div>
<div class="menu-item"><i class="fa fa-globe"></i><span>Panel</span></div>
<div class="menu-item"><i class="fa fa-user"></i><span>Profile</span></div>
<div class="menu-item"><i class="fa fa-envelope"></i><span>Support</span></div>
<a class="menu-item" href="index.php?logout='1'"><i class="fa fa-power-off"></i><span>Logout</span></a>
</div>
</div>
</div>
</div>
</div>
<div>
<a target="_blank" style="display: block; position: fixed; bottom: 45px; right: 10px; width: 200px;" href=""><img src="https://i.imgur.com/EV5CGy2.png" alt="logo"/></a>
<a target="_blank" style="display: block; position: fixed; bottom: 15px; right: -24px; width: 200px;" href="http://www.abr.business.gov.au/ABN/View/93742390655"><img src="" alt=""/>ABN: 93 742 390 655</a>
</div>
<div id="wrap1">
<div class="ml-auto pt-5">
<?php if (isset($_SESSION['username'])) : ?>
Welcome, <strong><?php echo $_SESSION['username']; ?></strong>.
<?php endif ?>
</div>
</div>
<div id="wrap">
<br><br><br><h1 style="font-weight: 300; padding-left: 80px">Shopping cart -</h1>
<p style="font-weight: 300; padding-left: 80px ">Check out with your items</p>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
example
<br>
example
<br>
example
<br>
</div>
</body>
<script type="text/javascript">
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/5b7d1d95afc2c34e96e7ca57/default';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>
<?php if (isset($_SESSION['success'])) : ?>
<div class="error success" >
<h3>
<?php
echo $_SESSION['success'];
unset($_SESSION['success']);
?>
</h3>
</div>
<?php endif ?>
</script>
</html>
enter image description here
I simply can not scroll down -
Please ensure you let me know if you need anything other than what has been provied
CSS -
body{
margin: 0;
overflow: hidden;
}
#main{
position: fixed;
top: 0;
left: 0;
width: 15%;
height: 100%;
background-color: #ddeaf1;
}
.table{
display: table;
width: 100vw;
height: 100vh;
}
.table-cell{
display: table-cell;
vertical-align: middle;
text-align: center;
}
.menu{
background-color: white;
width: 30%;
margin: auto;
display: flex;
align-content: flex-start;
flex-flow: row wrap;
justify-content: space-around;
border-radius: 10px;
-moz-box-shadow: 0px 0px 5px 0px #c0c0c0;
-webkit-box-shadow: 0px 0px 5px 0px #c0c0c0;
-o-box-shadow: 0px 0px 5px 0px #c0c0c0;
box-shadow: 0px 0px 5px 0px #c0c0c0;
filter:progid:DXImageTransform.Microsoft.Shadow(color=#c0c0c0, Direction=NaN, Strength=5);
}
#media all and (max-width: 900px){
.menu{
width: 80%;
}
}
.menu-item{
font-size: 17px;
flex: 1;
padding: 25px;
transition: all .2s;
cursor: pointer;
color: #636363;
background-color: white;
border-radius: 10px;
position: relative;
}
.menu-item > span{
display: block;
position: absolute;
text-transform: uppercase;
font-size: 10px;
font-weight: 200;
color: white;
left: 5px;
right: 5px;
border-radius: 5px;
background-color: #226eab;
padding: 5px;
opacity: 0;
transition: all .2s .1s;
transform: translateY(70px);
z-index: -1;
}
.menu-item:hover{
-moz-box-shadow: 0px 0px 5px 0px #c0c0c0;
-webkit-box-shadow: 0px 0px 5px 0px #c0c0c0;
-o-box-shadow: 0px 0px 5px 0px #c0c0c0;
box-shadow: 0px 0px 5px 0px #c0c0c0;
filter:progid:DXImageTransform.Microsoft.Shadow(color=#c0c0c0, Direction=NaN, Strength=5);
flex: 2;
color: #226eab;
transform: scale(1.1);
z-index: 3;
}
.menu-item:hover > span{
transform: translateY(35px);
opacity: 1;
}
#wrap{
width: 95%;
min-width: 900px;
margin-left: 18%;
}
#wrap1{
width: 95%;
min-width: 900px;
margin-left: 80%;
}
Any suggestions would be greatly appreciated, this is my first project so don't judge to hard :)
Remove overflow: hidden; from your CSS body element. If you do not want to let page elements cause your page to be wider than the actual viewport’s width, replace it with max-width: 100vw; and overflow-x: hidden;. vw is the unit for a percentage of the viewport width.
You have added
overflow: hidden;
to the body, so you can't scroll. Please remove the hidden so that you can scroll
please check you have enough data (> your view port) for scrollbar to appear.
Please refer here for css changes if needed
enter link description here
enter link description here
enter link description here
Try css on body
overflow-y: scroll;
*remove overflow:hidden on body

HTML Popup opacity issue

Hi im working on a page wich allows my viewers on twitch to donate for my stream...
When a user clicks on paypal he gets redirected to paypal and if he clicks on visa it opens the popup
The problem i have now is that the donation ammount alway has the same opacity as the popup....
Popup screenshot
Did someone knows what the problem could be?
My index.php:
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- META -->
<meta name="description" content="RyuZockt.at StreamDonations" />
<meta name="keywords" content="stream, livestream, ryuzockt, donation, spende, support" />
<meta name="author" content="RyuZockt">
<meta name="revisit-after" content="3 days" />
<title> RyuZockt.at Donations</title>
<link rel="icon" type="image/png" href="/assets/img/favicon.png" />
<!-- Google Fonts -->
<link href="http://fonts.googleapis.com/css?family=Comfortaa:400,700" rel="stylesheet" type="text/css">
<!-- STYLE -->
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="assets/css/bootstrap.css">
<!-- Font Awesome 4.1.0 -->
<link href="assets/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<!-- Theme -->
<link href="assets/css/style.css" rel="stylesheet">
<link href="assets/css/popup.css" rel="stylesheet">
<!-- /STYLE -->
</head>
<body oncontextmenu="return false;" style="background-image: url(assets/img/bg.jpg);">
<!-- Modal PopUp-->
<div id="myModal" class="modal">
<!-- Modal Content -->
<div class="modal-content">
<span class="close"><i class="fa fa-times" aria-hidden="true"></i></span>
<p><strong>Diese Zahlungsmethode ist momentan noch nicht verfügbar <img src="assets/img/sad.png"></strong></p>
</div>
</div>
<div class="col-md-12">
<div class="container-md">
<div class="panel cart panel-default">
<div class="panel-heading text-center">
<img class="avatar" src="assets/img/ryu.jpg">
<h1>RyuZockt</h1>
</div>
<div class="panel-body cart-form">
<form method="post" enctype="multipart/form-data" action="startDonation.php">
<!-- Name und Betrag -->
<div class="row">
<!-- Name -->
<div class="col-md-6">
<div class="form-group">
<input type="text" name="name" required="required" class="form-control" placeholder="Benutzername">
</div>
</div>
<!-- Betrag -->
<div class="col-md-6">
<div class="form-group">
<div class="input-group">
<input type="text" name="betrag" required="required" class="form-control" placeholder="Betrag (frei wählbar)" value="5">
<span class="input-group-addon" id="basic-addon2"><i class="fa fa-eur fa-lg" aria-hidden="true"></i></span>
</div>
</div>
</div>
</div>
<!-- /Name und Betrag -->
<!-- Nachricht -->
<div class="row">
<div class="col-md-12">
<div class="form-group">
<textarea rows="8" maxlength="50" type="text" name="msg" class="form-control" placeholder="Nachricht an RyuZockt (max. 50 Zeichen)"></textarea>
</div>
</div>
</div>
<!-- /Nachricht -->
<!-- Spacer -->
<div class="labelled-separator">
<div class="label-wrapper">
<label class="required"> Donaten mit</label>
</div>
</div>
<!-- /Spacer -->
<!-- Pay Buttons -->
<div class="row small-gap">
<!-- PayPal -->
<div class="col-md-6 col-xs-6 payment-mean payment-paypal">
<div class="form-group">
<button type="submit" style="width: 100%;" name="paypal" required="required" class="btn btn-default btn-bump btn-paypal" value="PAYPAL">PayPal</button>
</div>
</div>
<!-- /PayPal -->
<!-- Sofort -->
<div class="col-md-6 col-xs-6 payment-mean payment-mangopay">
<div class="form-group">
<button id="sofort" type="button" style="width: 100%;" name="mangopay-sofort" required="required" class="btn btn-default btn-bump btn-mangopay-sofort" value="MANGOPAY_SOFORT">MangoPay-Sofort</button>
</div>
</div>
<!-- /Sofort -->
<!-- Paysafe Card -->
<div class="col-md-6 col-xs-6 payment-mean payment-mangopay">
<div class="form-group">
<button id="psc" type="button" style="width: 100%;" name="mangopay-psc" required="required" class="btn btn-default btn-bump btn-mangopay-psc" value="MANGOPAY_PSC">MangoPay-PSC</button>
</div>
</div>
<!-- /Paysafe Card -->
<!-- Visa-Mastercard -->
<div class="col-md-6 col-xs-6 payment-mean payment-mangopay">
<div class="form-group">
<button id="visa" type="button" style="width: 100%;" name="mangopay-visa" required="required" class="btn btn-default btn-bump btn-mangopay-visa" value="MANGOPAY_VISA_MASTERCARD">MangoPay-Visa-Mastercard</button>
</div>
</div>
<!-- /Visa-Mastercard -->
</div>
<!-- /Pay Buttons -->
</form>
</div>
</div>
</div>
</div>
<!-- Scripte -->
<script src="assets/js/modal-popup.js"></script>
</body>
</html>
My style.css:
html, body{
min-height: 100%;
font-family: 'Comfortaa', 'sans-serif';
letter-spacing: -0.5px;
width: 100%;
}
h1{
font-family: 'Comfortaa', 'sans-serif';
letter-spacing: -0.5px;
font-size: 2.6rem;
word-break: break-word;
}
.div{
display: block;
}
.img{
vertical-align: middle;
}
.h1{
font-size: 2.6rem;
margin-top: 0;
margin-bottom: 20px;
}
.form{
display: block;
margin-top: 0em;
}
.form-group{
margin-bottom: 15px;
}
.textarea{
border-top-left-radius: 2px;
border-top-right-radius: 2px;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
padding: 6px 12px 6px 12px;
resize: none;
overflow: hidden;
border-bottom: 0;
}
.input-group{
position: relative;
display: table;
border-collapse: separate;
font-family:
}
.input-group-addon{
border-radius: 0;
background-color: #f9f9f9;
padding: 6px 12px;
font-size: 14px;
font-weight: normal;
line-height: 1;
color: #555555;
text-align: center;
border: 1px solid #ccc;
width: 1%;
white-space: nowrap;
vertical-align: middle;
display: table-cell;
box-sizing: border-box;
}
.cart-body .form-control{
font-size: 1.8rem;
line-height: 3rem;
min-height: 45px;
}
.form-control{
display: block;
width: 100%;
padding: 6px 12px;
color: #555555;
background-color: #FFF;
border: 1px solid #ccc;
border-radius: 2px;
height: 40px;
border-width: 1px;
}
textarea {
resize: none;
}
.row{
margin-left: -15px;
margin-right: -15px;
}
.cart{
position: relative;
margin-top: 100px;
border: none;
box-shadow: none;
}
.panel{
margin-bottom: 20px;
background-color: #FFF;
border: 1px solid transparent;
border-radius: 2px;
}
.cart .avatar{
margin-top: -60px;
width: 100px;
height: 100px;
border-radius: 50%;
border: 2px solid #FFF;
}
.cart-body .panel-body{
padding: 20px;
background-color: #FFF;
box-sizing: border-box;
}
.col-md-12{
width: 100%;
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
float: left;
}
.container-md{
width: auto;
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
box-sizing: border-box;
max-width: 500px;
}
.labelled-separator{
border-top: 1px solid #ccc;
margin-bottom: 20px;
margin-top: 40px;
position: relative;
}
.labelled-separator .label-wrapper{
position: absolute;
top: -13px;
width: 100%;
text-align: center;
}
.cart-body .labelled-separator label{
background-color: #f4f4f4;
}
.labelled-separator label{
display: inline-block;
padding: 0 10px;
background: #fff;
}
label{
font-size: 10px;
font-family: sans-serif;
color: #777788;
text-transform: uppercase;
max-width: 100%;
margin-bottom: 5px;
font-weight: bold;
}
.row.small-gap{
margin-left: -3px;
margin-right: -3px;
}
.btn {
display: inline-block;
margin-bottom: 0;
font-weight: normal;
text-align: center;
vertical-align: middle;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
white-space: nowrap;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
border-radius: 2px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
.btn-bump{
line-height: 3rem;
box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15);
border-width: 2px;
}
.btn-paypal{
text-indent: -9999px;
color: #333333;
border-color: #cccccc;
background: url(http://ryuzockt.at/donate/assets/img/paypal.png) no-repeat 50% 50%;
background-size: auto 60%;
}
.btn-mangopay-sofort{
text-indent: -9999px;
color: #333333;
border-color: #cccccc;
background: url(http://ryuzockt.at/donate/assets/img/mangopay-sofort.png) no-repeat 50% 50%;
background-size: auto 60%;
}
.btn-mangopay-psc{
text-indent: -9999px;
color: #333333;
border-color: #cccccc;
background: url(http://ryuzockt.at/donate/assets/img/mangopay-psc.png) no-repeat 50% 50%;
background-size: auto 60%;
}
.btn-mangopay-visa{
text-indent: -9999px;
color: #333333;
border-color: #cccccc;
background: url(http://ryuzockt.at/donate/assets/img/mangopay-visa.png) no-repeat 50% 50%;
background-size: auto 60%;
}
and at least
my popup style.css
/* Modal PopUp */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}
/* Modal Content */
.modal-content {
background-color: #fefefe;
margin: auto;
padding: 20px;
border: 1px solid #888;
width: 45%;
text-align: center;
}
/* The Close Button */
.close {
float: right;
font-size: 20px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
It looks like the z-index of the input is greater than the z-index of the modal. I removed this line from the code and the donation amount has the same opacity as the background...
change this styling:
.input-group .form-control{
z-index: 2;
}
to this:
.input-group .form-control{
z-index: 0;
}
As mentioned by the other answer the problem is due to the z-index. I would not recommend you changing or generally overwriting the bootstrap code as long as you are not 100% secure in what you do. Better just increase the z-index of your modal like this.
.modal {
/* your other properties */
z-index: 10; /* Sit on top */
}

div id background color does not show

I would like the background colour for 'top2' division to be light green. But it seems that css is not working! The cell padding for 'left' division is not working as I want the text 'online discussision portal' centered vertically.
Please help.
account.php
<?php
require 'connection.php';
session_start();
if(!isset($_SESSION['id'])) {
header("location:login.php");
} else {
?>
<!doctype html>
<html>
<head>
<title>welcome</title>
<link href="acc.css" type="text/css" rel="stylesheet" media="all" />
<style>
table {
table-layout:fixed;
width:1030px;
}
body {
background-image: url("border1.jpg");
background-size:cover;
}
</style>
</head>
<body>
<div id="top1">
<div id="left">
<h4> <center> <font color="green"> ONLINE DISCUSSION PORTAL </font> </center> </h4>
</div>
<div id="middle">
</h4>
<center> <i> Notifications </i> </center>
</h4>
</div>
<div id="right">
</h4>
<center> <i> Logout </i> </center>
</h4>
</div>
</div>
<div id="top2">
<table height="60px" width="1030px">
<tr>
<th> <u> Forum </u> </th>
<th> <u> My Questions </u> </th>
<th> <u> My Answers </u> </th>
</tr>
</table>
</div>
<div id="content">
<h3> You are Logged in. </h3>
</div>
</body>
</html>
<?php
}
CSS
acc.css A.class1 {
color: green;
}
A.class1:link {
text-decoration: none;
color: green;
}
A.class1:visited {
text-decoration: none;
color: green;
}
A.class1:hover {
text-decoration: underline;
color: red;
}
A.class1:active {
text-decoration: none;
color: green;
}
A.class2 {
color: white;
}
A.class2:link {
text-decoration: none;
color: white;
}
A.class2:visited {
text-decoration: none;
color: white;
}
A.class2:hover {
text-decoration: underline;
color: yellow;
}
A.class2:active {
text-decoration: none;
color: white;
}
#top1 {
height: 40px;
width: 1030px;
border: 1px solid #008000;
font-family: whimsy TT;
margin: auto;
margin-top: 50px;
}
#left {
border: 1px solid #008000;
height: 25px;
width: 624px;
float: left;
margin: auto;
color: 82b52f;
padding-bottom: 15px;
}
#middle {
border: 1px solid #008000;
height: 32px;
width: 200px;
float: left;
margin: auto;
color: white;
padding-top: 8px;
}
#right {
border: 1px solid #008000;
height: 32px;
width: 200px;
float: left;
margin: auto;
color: white;
padding-top: 8px;
}
#top2 {
background-color: 82b52f;
height: 60px;
width: 1030px;
border: 1px solid #008000;
font-family: whimsy TT;
margin: auto;
color: white;
}
#content {
border: 1px solid #008000;
height: 430px;
width: 1030px;
margin: auto;
}
You miss # for color-background property. So it should be background-color:#82b52f
For align to left you must remove <center> tag.
You are missing the hash symbol # before the color code:
acc.css
A.class1 {color:green;}
A.class1:link {text-decoration: none; color: green;}
A.class1:visited {text-decoration: none; color: green;}
A.class1:hover {text-decoration: underline; color: red;}
A.class1:active {text-decoration: none; color: green;}
A.class2 {color:white;}
A.class2:link {text-decoration: none; color: white;}
A.class2:visited {text-decoration: none; color: white;}
A.class2:hover {text-decoration: underline; color: yellow;}
A.class2:active {text-decoration: none; color: white;}
#top1
{
height:40px; width:1030px; border:1px solid #008000; font-family:whimsy TT; margin:auto; margin-top:50px;
}
#left
{
border:1px solid #008000; height:25px; width:624px; float:left; margin:auto; color:82b52f; padding-bottom:15px;
}
#middle
{
border:1px solid #008000; height:32px; width:200px; float:left; margin:auto; color:white; padding-top:8px;
}
#right
{
border:1px solid #008000; height:32px; width:200px; float:left; margin:auto; color:white; padding-top:8px;
}
#top2
{
background-color:#82b52f; height:60px; width:1030px; border:1px solid #008000; font-family:whimsy TT; margin:auto; color:white;
}
#content
{
border:1px solid #008000; height:430px; width:1030px; margin:auto;
}
account.php
<?php
require 'connection.php';
?>
<?php
session_start();
if(!isset($_SESSION['id']))
{
header("location:login.php");
}
else
{
?>
<!doctype html>
<html>
<head>
<title>welcome</title>
<link href="acc.css" type="text/css" rel="stylesheet" media="all" />
<style>
table {
table-layout:fixed;
width:1030px;
}
body {
background-image: url("border1.jpg");
background-size:cover;
}
</style>
</head>
<body>
<div id="top1">
<div id="left">
<h4> <center> <font color="green"> ONLINE DISCUSSION PORTAL </font> </center> </h4>
</div>
<div id="middle">
</h4> <center> <i> Notifications </i> </center> </h4>
</div>
<div id="right">
</h4> <center> <i> Logout </i> </center> </h4>
</div>
</div>
<div id="top2">
<table height="60px" width="1030px">
<tr>
<th> <u> Forum </u> </th>
<th> <u> My Questions </u> </th>
<th> <u> My Answers </u> </th>
</tr>
</table>
</div>
<div id="content">
<h3> You are Logged in. </h3>
</div>
</body>
</html>
<?php
}
?>

Login should be in center of the page

In the below code i have placed the controller.the actual result is ligin is in center position but it is in the bottom.My expected result is login should come in center of the page.pls help me to do this.
Controller:
<html>
<head>
</head>
<title>login_form</title>
<BODY onLoad="noBack();" onpageshow="if (event.persisted) noBack();" onUnload=""><div class="container">
<div class="row">
<div class="span4 logo">
<img src="<?php echo base_url('img/logosl.png'); ?>" style="margin-bottom:7px; margin-top:7px;"/>
</div>
<center ><div id="login_form" >
<h1>Login!</h1>
<form action="<?php echo base_url(); ?>index.php/login/validate_credentials" method="post" >
<input type="text" name="username" required placeholder="username" style="height: 25px;" value="" />
<input type="text" name="password" required placeholder="password" style="height: 25px;" value="" />
<input type="text" name="college_name" required placeholder="college_name" style="height: 25px;" value="" />
<input type="submit" name="submit" value="Login" class="btn-success btn" />
Create Account
</form>
</div></center><!-- end login_form-->
<?php $this->load->view('includes/header'); ?>
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>css/style1.css" />
<?php $this->load->view('includes/footer'); ?>
</body>
</html>
css
body {
background:#FFFFFF;
margin: 0;
padding: 0;
font-family: arial;
}
#login_form {
width: 300px;
background: #f0f0f0 url(../img/login_bg.jpg) repeat-x 0 0;
border: 1px solid white;
margin: 250px auto 0;
padding: 1em;
-moz-border-radius: 3px;
}
h1,h2,h3,h4,h5 {
margin-top: 0;
font-family: arial black, arial;
text-align: center;
}
input[type=text], input[type=password] {
display: block;
margin: 0 0 1em 0;
width: 280px;
border: 5px;
-moz-border-radius: 1px;
-webkit-border-radius: 1px;
padding: 1em;
}
input[type=submit], form a {
border: none;
margin-right: 1em;
padding: 6px;
text-decoration: none;
font-size: 12px;
-moz-border-radius: 4px;
background: #348075;
color: white;
box-shadow: 0 1px 0 white;
-moz-box-shadow: 0 1px 0 white;
-webkit-box-shadow: 0 1px 0 white;
}
input[type=submit]:hover, form a:hover {
background: #287368;
cursor: pointer;
}
/* Validation error messages */
.error {
color: #393939;
font-size: 15px;
}
fieldset {
width: 300px;
margin: auto;
margin-bottom: 2em;
display: block;
}
/* FOR FUN */
h1 {
text-shadow: 0 1px 0 white;
}
/* Not necessary. Just the "tutorial created by" stuff at the bottom */
#tutInfo {
background: #e3e3e3;
border-top: 1px solid white;
position: absolute;
bottom: 0;
width: 100%;
padding: .7em .7em .7em 2em;
}
You are missing < / div>
<div class="row">
<div class="span4 logo">
<img src="<?php echo base_url('img/logosl.png'); ?>" style="margin-bottom:7px; margin-top:7px;"/>
</div>
**</div>**

Categories