I'm having the following problem:
I've created a landing page with a wordpress plugin from my website (As building it with the plugin I have is SO EASY!) then copied the source html code and pasted it into the wanted wordpress site, into a blank page.
The problem is that now wordpress is creating a weird margin (white space) on top making the landing page appear further down.
Can I copy source html code and past into a Wordpress page and avoid white margin on top ?
Everything looks like working fine when I copy and paste then HTML code, besides this annoying top margin that I really don't understand where is coming from...
Go to your CSS page
put
*{margin:0px;
padding:0px}
It will remove your white margin and padding*
Related
I'm asking for help for those who have experience in changing an html file to a php file. I've tried everything I know (and I'm not the smartest I admit) but I don't understand why the following is happening.
Currently: When viewing on mobile, the mobile menu button has gone, the toggle switch which changed prices from monthly to annually, tabs which displayed different content has gone. As a result:
If there was a toggle, both the toggle results are displayed one above the other
If there was a tab, each tab element is displayed underneath the other
The mobile menu button has gone completely
Background:
I purchased an HTML template but it turns out the seller didn't want to help. I wanted to split and convert the page into a php page as I wanted a single header/footer file which I could import. As you will see (if you check the repo) the header.php and footer.php file is getting imported into the page php file.
I created the pages by first:
Renaming the original html file to a php file
Cut the header and footer and import them back into the page php file
That's all I have done. It seemed to work, however another check (after cache cleared) I noticed the issues.
The link to the site page im referring to is:
https://blueboxhosting.co.uk/products-cloud-hosting
But if you look at any of the pages, you'll see errors on all of them now where they're should have been controls (eg toggles, mobile menu, tabs etc)
I've created a snipped so you can view the code and HOPEFULLY spot where I've been a moron:
https://bitbucket.org/snippets/bbhostinguk/7e5qxp
Any help with this would be amazing as I just can't figure it out.
Start by running the HTML generated by PHP through a validator, e.g. https://validator.w3.org/
Your code has numerous stray tags which may or may not affect the rendering.
Another tip is to comment off everything and then uncomment section by section and check when things start to break.
You can see on this page: http://oaktreehealth.ca/community/
That the PHP is not rendering out for some reason. I have the same function enabled on most other pages where you see the image in the background at the top of the page.
I'm not sure why all of a sudden it stopped rendering on this page? It was working fine, maybe a wordpress update?. I'm using wooththemes Canvas with a child theme. The only difference with this page is that it is a modified template of the blog template.
The area causing trouble is called in my functions to grab the template part. All other pages do this fine except this one. Any idea?
I'm not entirely sure how to add code in here, but i'm happy to send anything along to help.
The page you've linked, seems to have encoding issues, i believe due to white spaces before the php tag, if you inspect the source, you can see:
��<?php
Check the script corresponding to the following comment (as per the source):
/**
* Template part for Media Feature Area
*/
And try to remove all whitespaces at the beginning and end of the script.
I have two questions im sure are very simple I'm just looking over something.
1.) To start off, my website is mostly HTML, except I have a WordPress blog page. To make the blog page look like the HTML home page, I modified the header.php and footer.php, and everything looks fine except one problem.
As you'll notice if you compare the Home page with the Blog page, for some reason the margins I have to position the navigation links & social media icons isn't working but it works on the home page? I really have no idea why it isn't working, the stylesheet is linked correctly and everything, as every other style works fine except the margin in those areas.
2.) At the bottom of the home page there is a white space below the footer, but its not on the WordPress blog page? I am trying to remove the white space but have had no luck. The only way I can remove it is if I make the footer 30px larger, which I don't want to do. I have set heights on the HTML, Body and am unsure why the space is there.
Thanks ahead of time, I appreciate you taking the time to look at my questions.
EDIT here is a link to the site:
http://jqwebexamples.com/iAM_Talent/Version3-rev/index.html
The <p> Tags in your footer are the problem. If you remove (or disable it temporarily) the following style:
#footer p {
margin-top: 45px;
}
then the white line disappears. Take a look in firebug to check this out.
The other issue looks like caused by the unsorted list in your navigation div.
I am having a hard time figuring out what's going on with a theme for a new script that i just bought.
My site is azngirls.com (don't worry it's not pornographic hahah) and if you go to the frontpage you will see that there is a nav bar on top or header bar that shows Login - Register (Forgot Password) and etc. and that bar is supposed to be on top without any gap but if you go to other parts of the site like for example http://azngirls.com/tos - you will see that there is a gap between that nav bar and the actual top of the website which makes it look awkward when you scroll down. This problem occurs everytime i edit the smallest things inside the php file, as in even if i change a single word or letter it suddenly shows that gap.
Another problem that I am having is that on the same page - on the side bar to the right there is a "Show me" button for Browser Plugins but when i click the link it takes me to a 404 page, but when i click the Tools link in the footer menu it takes me to a page that works.
Thanks alot for any help you guys can give! Really appreciate it!
you have a huge empty line filled with whitespace between <body> and <meta> tags. and you included a <meta> tag inside a body, as it should be in the <head> tag.
As #tpaksu suggested, your html is totally messed up. And there is a easy fix to your problem, just add the following code to your style sheet.
.content-infobox {
top: 0;
}
use this code on the respective ID
#id{
margin:0px;
}
I want to have a sidebar in my website with navigation in it. I will use script like phpBB etc. but I want sidebar to be displayed on every page.
So I am thinking about making a Sidebar in HTML and then using frame tag for displaying other pages/scripts.
But as Frames are getting obsolute, Is there any other method to display a sidebar in everypage without using frames and without adding html coding on every page?
Put your HTML in a PHP file (or HTML if you want) with no or other tags aside from what you want to display, then put the following on each page you want to display the menu on:
<?php include ('page-name.php'); ?>
One line of code is all you need. If you make a change to the 'page-name.php' file, it updates on every page.
Cheers
This question was asked here and on Webmasters; I answered it over there.