Problem with Wordpress' div class="Post", "Entry" and "postmetadata" - class

Im having trouble with my codes in wordpress. You can see my problem in the link below:
http://i1204.photobucket.com/albums/bb409/bendaggers/help-1.png
as you can see, i'm having trouble sticking them all together
the CSS codes are here:
.post{
padding: 10px 0 0 0px;
background-image: url(images/toppost.png);
background-repeat:no-repeat;
}
.entry{
background-image:url(images/ContentBG.png);
margin: 0 0 0 0;
padding:0 0 0 0;
background-position: bottom;
}
.postmetadata {
clear: both;
background-image: url(images/post-footer.png);
background-repeat:no-repeat;
height:118px;
}
the php codes are here:
<div id="container">
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><?php the_title(); ?> </h2>
</div>
<div class="entry">
<?php the_content(); ?></div>
<p class="postmetadata">
<?php _e('Filed under:'); ?> <?php the_category(', ') ?> <?php _e('by'); ?> <?php the_author(); ?><br />
<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <?php edit_post_link('Edit', ' | ', ''); ?>
</p>
<?php endwhile; ?>
can you help me with my problem? its taking me so looong to solve this one coz im still a newbie in wordpress.
thanks in advance.

You need to add padding to your classes:
.post{
padding: 10px 5px 0 5px;
background-image: url(images/toppost.png);
background-repeat:no-repeat;
}
.entry{
background-image:url(images/ContentBG.png);
margin: 0 0 0 0;
padding:0 5px;
background-position: bottom;
}
.postmetadata {
clear: both;
background-image: url(images/post-footer.png);
background-repeat:no-repeat;
height:118px;
padding:0 5px;
}

Related

chartJS generateLegend()

I'm new in using chart JS, I am trying to customize the legends. I try the example that I found but when I try to make my own it shows this error.
I want to display the legends in separate like in this.
here's my code.
var myLegendContainer = document.getElemenById('legend');
var graphTarget = $("#line-chartcanvas");
graphTarget.attr('height',80);
barGraphQty = new Chart(graphTarget, {
type: 'bar',
data: chartdata,
options: {
legend: {
display: false
},
}
});
myLegendContainer.innerHTML = barGraphQty.generateLegend();
});
HTML code
<div class="col-md-4">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">Legends</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
<div id="legend"></div>
</div>
</div>
</div>
CSS
[class$="-legend"] {
list-style: none;
cursor: pointer;
padding-left: 0;
}
[class$="-legend"] li {
display: block;
padding: 0 5px;
}
[class$="-legend"] li.hidden {
display:block !important;
text-decoration: line-through !important;
}
[class$="-legend"] li span {
border-radius: 5px;
display: inline-block;
height: 10px;
margin-right: 10px;
width: 10
please help me.
Without seeing your code, it's almost impossible to tell why exactly this TypeError occurs. From the posted image, I deduct however that the use of generatelabels is not the ideal choice to achieve what you need.
What you really need is generating custom HTML legend using legendCallback together with some CSS.
Please take a look at the following posts to see how this could be done:
https://stackoverflow.com/a/63216656/2358409
https://stackoverflow.com/a/63202664/2358409

creating multiple div elements in <b-card>

I would like to add 3 div elements in a top section of a card where currently there is an image. I would like to add an image, logo and text message in place of that image. What can I do???
Thanks in Advance,
Here's my code
1)HTML
<div class="card">
<b-card no-body
style="width: 20rem;"
img-src="https://placekitten.com/380/200"
>
<b-list-group class="group">
<b-list-group-item>Anvay Joshi</b-list-group-item>
<b-list-group-item>Computer</b-list-group-item>
<b-list-group-item>A-1103</b-list-group-item>
<b-list-group-item>30-11-1997</b-list-group-item>
<b-list-group-item>anvay.joshi#viit.ac.in</b-list-group-item>
<b-list-group-item>9766583977</b-list-group-item>
</b-list-group>
<b-button href="#" variant="primary">QR Code</b-button>
</b-card>
2)CSS
.group {
text-align: center;
}
.header{
text-align: center;
}
.card {
margin: 25px 120px 25px 240px;
border: none;
}
My Actual output looks like as shown
/Users/anvayjoshi/Desktop
My expected output is the top part of the card as shown
/Users/anvayjoshi/Desktop
Please help me !!!!!
Instead of using the img-src attribute on b-card, you can just add a new b-list-group-item.
Here's a jsfiddle demonstrating that, and an image of the result.
new Vue({
el: "#app",
data: {
}
});
.image {
float: left;
}
.logo {
float: left;
margin-right: 10px;
margin-left: 10px;
margin-top: 20px;
}
.text {
float: left;
width: 100px;
}
.group {
text-align: center;
}
.header {
text-align: center;
}
.card {
margin: 10px;
border: none;
}
<div id="app">
<div class="card">
<b-card no-body style="width: 20rem;">
<b-list-group class="group">
<b-list-group-item>
<img class="image" src="https://placekitten.com/100/100" />
<img class="logo" src="https://placekitten.com/50/50" />
<div class="text">
Vishwakarma Institute of Information Technology
</div>
</b-list-group-item>
<b-list-group-item>Anvay Joshi</b-list-group-item>
<b-list-group-item>Computer</b-list-group-item>
<b-list-group-item>A-1103</b-list-group-item>
<b-list-group-item>30-11-1997</b-list-group-item>
<b-list-group-item>anvay.joshi#viit.ac.in</b-list-group-item>
<b-list-group-item>9766583977</b-list-group-item>
</b-list-group>
<b-button href="#" variant="primary">QR Code</b-button>
</b-card>
</div>
</div>

How do I get a current facebook access_token when accessing group events with graph api?

I have this code for accessing and displaying Facebook events from a Facebook Group. If you use a current access_token, this works but the access_tokens are only valid for an hour or so. What code do I need to add to programatically get a current access_token each time the page loads?
I have looked at the facebook advice and it puts my page into a permanant loop.
<?php
header ('Content-type: text/html; charset=utf-8');
$limit = 5;
$group_id = '68663437095';
$url1 = 'https://graph.facebook.com/'.$group_id;
$des = json_decode(file_get_contents($url1));
$url2 = "https://graph.facebook.com/68663437095/events?access_token=CAACEdEose0cBAORQs8KFqo6Fw1ZA78alt8CgH3pyKgEVWdbsxWmBhjwVqOOSqst51fb1ZCHK0Dtz8CmTDCZByqoJMoaXcEU6qjN4IO1JWExSwuHzVRmNU5JEkzpdcSuhPd8StyYSObAhXU4DKngmnHtvF018wZAmsg8GEFXNatcZAZBBMbJmsUOvwSOa7DubIZD";
$data = json_decode(file_get_contents($url2));
?>
<style type="text/css">
.wrapper {
width:200px;
border:1px solid #ccc;
font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
background-color: black;
float:left;
}
.top {
margin:5px;
border-bottom:2px solid #e1e1e1;
float: left;
width:290px;
}
.single {
margin:5px;
border-bottom:1px dashed #e1e1e1;
float:left;
}
.img {
float:left;
width:60px;
text-align:center;
margin:5px 5px 5px 0px;
border-right:1px dashed #e1e1e1;
}
.text {
width:220px;
float:left;
font-size:10px;
}
a {
text-decoration: none;
color: #3b5998;
}
</style>
<div style="width: 250px; padding-bottom:15px;"><br/>
<div style="width: 190x; margin-left:15px;">
<a target="_parent" style="font-size:40px;" href="http://www.facebook.com/groups/fumcbixby/"> <?=$des->name?></a>
<div style="width:100%; margin: 5px">
<?=$des->description?>
</div>
</div><br/>
<?
$counter = 0;
foreach($data->data as $d) {
if($counter==$limit)
break;
?>
<div style="width: auto; background-color:white; margin-left:15px; margin-bottom:15px; padding:5px">
<div style="float: left; width:120px;">
<img src="https://graph.facebook.com/<?= $d->id?>/picture">
</div>
<div>
<h2>Name <?= $d->name?></h2>
<h3>Location <?= $d->location?></h3>
<p>Start<?= date('F j, Y H:i',strtotime($d->start_time))?></p>
<p>End<?= date('F j, Y H:i',strtotime($d->end_time))?></p>
Visit Event
</div>
</div>
<?
$counter++;
}
?>
</div>
Get Extended Access Token which will be valid for 60 days
https://graph.facebook.com/oauth/access_token?
client_id=APP_ID&
client_secret=APP_SECRET&
grant_type=fb_exchange_token&
fb_exchange_token=EXISTING_ACCESS_TOKEN
Put APP_ID, APP_SECRET & EXISTING_ACCESS_TOKEN in the above url & make a HTTP request.
HTTP request will return JSON Array. Then you can easily parse Extended Access Token
Have a look at this question....
How to renew/extend facebook access tokens with PHP?

Column with div style and div id

For some reason I cannot get the text in my middle column (of three columns) to respond to any classes or styles I apply to it. I'm just trying to slide the text in the middle column over to the right a little bit.
CSS (stylesheet):
#footer-address {
font-size:20px;
padding-left:20px;
}
#nav-foot{
border:1px solid #ccc;
border-width:1px 0;
list-style:none;
margin:0;
padding:0px;
text-align:left;
font-size:12px;
}
#nav-foot li{
display:inline;
}
#nav-foot a{
display:inline-block;
padding:20px 0 20px 0;
}
#nav-social {
border:1px solid #ccc;
border-width:1px 0;
display:inline;
list-style:none;
margin:0;
padding:0px;
float: left;
}
#nav-social li{
display:inline;
}
#nav-social a{
display:inline-block;
padding:20px 0 20px 0;
}
HTML:
<div style="width:30%; float:left; margin: 10px 0 10px 0; position:relative;">
<ul id="nav-foot">
<li>About Us</li>
<li>Jobs</li>
<li>Contact Us</li>
</ul>
</div>
<div id="footer-address" style="width:30%; float:left; margin: 10px 20px 10px 20px; position:relative;">
375 6th St. </br>
Atlanta, GA 30308 </br>
Phone: 404-981-3934 </br>
Email: admin#perimetermaids.com
</div>
<div style="width:30%; float:left; margin: 10px 0 10px 0; position:relative;">
<ul id="nav-social">
</i>
<li></i></li>
<li></i></li>
<li></i></li>
<li></i></li>
</ul>
</div>
Sorry if the code is sloppy or the formatting of my question, however, I'm really scratching my head as to why this won't work.
My URL is http://perimetermaids.com/test if anybody needs that as well. This is for the black footer area. Thanks for the help, and hope you all have an awesome weekend!

How to fix transparent div child in parent?

I have the CSS declare bellow:
#loadingBox-holder
{
height:100%;
width:100%;
position:fixed;
left:0;
top:0;
filter: alpha(opacity=30);
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=30);
opacity:0.7;
-moz-opacity: 0.7;
z-index: 1000;
background-color:#000;
}
#loadingBox
{
position: fixed;
left: 40%;
top: 50%;
z-index: 1000;
height: 36px;
width: 138px;
border:1px solid #ccc;
background:#fff !important;
padding:5px 5px 10px 10px;
opacity:100;
/*-moz-opacity: 100 !important; */
}
and HTML:
<div id="loadingBox-holder" style="">
<div id="loadingBox">
<p>Please wait...</p>
<img src="../Images/loading.gif" alt="" />
</div>
</div>
The code above is a loadding indicator. My problem is the loadingBox-hold is gray transparent but I want the loadingBox is normal not transprent. I add the css bellow:
filter: alpha(opacity=100);
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
opacity:1;
-moz-opacity: 1;
However the child div still transparent.
Where is my mistakes and how to fix that ?
Thanks !
If you are using position fixed then moving loadingBox out of holder would not make any difference in the final output and it'll fix your opacity issue.
<div id="loadingBox-holder" style="">
</div>
<div id="loadingBox">
<p>Please wait...</p>
</div>
​
DEMO