Like Box Height Being Cut - facebook

Why is the like box bottom being cut when I set a custom height? It just cuts the faces and its lower part isn't shown.
How can i fix it?
Thanks

If I understand your correction properly, this would be because you're not setting the height of the contents of the box, but rather the box itself.
<div height="x">
doesn't care about what's in the div, it makes the div only show x amount of it.

I was having the same issue and added these to my CSS
.fb-like span {
height: auto !important;
}
.fb-like iframe {
position: relative !important;
}

Related

webview background-color doesn't seem to expand to cover entire view

I have a webview that is picking up the background color in a css:
body {
color: var(--vscode-editor-foreground);
background-color: var(--vscode-editor-background);
}
Unfortunately, for "short" web pages, it's not expanding to cover the entire view port.
Is there something I can do to the html I'm including in the webview to expand it to fill the space? This obviously only happens on darker themes and light themes work fine - and doesn't happen with larger html files.
Turns out it was just another minor stylesheet issue:
html, body {
width: 100%;
height: 100%;
}
That fixed it right up. Thank you Mosh Feu for the answer.

Header Stretch: (1) will not shrink to fit iphone (2) how to set max width for desktop?

I am working on a CSS tumblr theme header found here grandneue.tumblr.com.
(1) Stretch: I want it to be able to stretch but only up to a maximum size as the header gets too pixelated otherwise), probably around 800px.
(2) Shrink: The second issue I have is, while the header does shrink down to a certain size (it does when I change the desktop browser window and to a certain extent on the iphone5), it doesn't shrink down fully so it fits 100% on a vertical iphone5 browser display.
Can anyone please help me solve these two queries? The content is totally fine so I don't understand why the header won't follow suit!
Looks like the problem is with the image, there's a lot of white space around the logo. Edit the header image to be 800px width and make sure the logo fits right to the edges. Then set the background properties on .header-image.cover to;
.header-image.cover{
-webkit-background-size: 100%;
-moz-background-size: 100%;
background-size: 100%;
margin: 0 -1px;
}
Then finally make the container div .header-image-wrapper ;
.header-image-wrapper{
max-width: 800px;
}
If on mobile the image is right to the edges, just add padding to the container with a media query :)
Hope this helps!

Bottom fixed div keeps jumping when scrolling on iPhone

I am working on a responsive design where I have a div container that should be fixed at the bottom of the viewport. The problem is that the div keeps moving when I scroll up/down the page and it takes a little while until its back in its fixed position.
Does anyone have an idea how to fix this jumping around? What else can I do than position: fixed and bottom: 0?
Thanks!! :)
Using position: sticky; instead of position: fixed; solved jumping problem on iOS for me.
did you try:
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
or maybe
-webkit-overflow-scrolling: touch
Hope this helps you !
There is a great article here. In my case I had the fixed element inside of the scrolling div. Once I placed it outside, no more jitters.
https://remysharp.com/2012/05/24/issues-with-position-fixed-scrolling-on-ios
For my current project, I had a <nav> element with a fixed position nested inside a <header> element with its own fixed position (semantically it could make sense to nest the nav the header for the DOM tree, but visually we wanted them to appear in separate places within the UI). Moving the nav out of the header, making it an immediate child of the <body> element, solved the problem.
I had a CSS block like this which was causing the issue.
html,
body {
overflow-x: clip;
...other styles
}
After the scrollable container tips above didn't work, I thought maybe the double overflow was the issue. I'm not sure why, but this fixed it for me:
html,
body {
...other styles
}
html {
overflow-x: clip;
}

How to make TinyMCE Responsive

I am making a Responsive site using the foundation framework and TinyMCE breaks the format when the page is scaled down(it's not responsive). How do I make TinyMCE responsive?
The TinyMCE editor can be made responsive by using css media queries. Simply add css rules that set the width property of table.mceLayout and the tinyMCE textareas. You will need to enforce these css rules using !important because they would otherwise be overwritten.
E.g., I use css similar to this:
/* on mobile browsers, I set a width of 100% */
table.mceLayout, textarea.tinyMCE {
width: 100% !important;
}
/* on large screens, I use a different layout, so 600px are sufficient */
#media only screen and (min-width: 600px) {
table.mceLayout, textarea.richEditor {
width: 600px !important;
}
}
See this jsfiddle: http://jsfiddle.net/johannesjh/384uf/
Note: You may wish to use different media queries or css classes to make use to the "foundation framework"'s responsive grid.
There is a way to get the toolbars to wrap on smaller screens.
/* make the toolbar wrap */
.mceToolbar td {
display:table-row;
float: left;
}
.mceToolbar td:nth-of-type(11){
clear: left;
}
I made a fork of the fiddle that Johannes posted that includes the above rules:
http://jsfiddle.net/joshfeck/gMVSE/
Making the toolbar responsive for the latest version of TinyMCE:
.tox-toolbar {
flex-wrap: nowrap !important;
overflow-x: auto !important;
}
.tox-toolbar__group {
flex-wrap: nowrap !important;
}
This adds a horizontal scrollbar to the toolbar on mobile devices.
TinyMCE 5.1 was released with a new mobile responsive design.
To ensure it functions as intended, you need to add the following code to the head of your pages that are using TinyMCE.
<meta name="viewport" content="width=device-width, initial-scale=1">
More information here: https://www.tiny.cloud/blog/the-future-of-work-is-mobile-and-tiny-is-ready-for-it
I'm using version 4 of TinyMCE, there is a plugin named autoresize. It makes the editor responsive.
Here is something I use on a site to make the editor resize and the toolbars moves with the size of the page :
.mceEditor table {
max-width:none; /* Bug in computation of fullscreen */
}
.mceEditor table.mceLayout {
width:100% !important;
height:auto !important;
}
table.mceToolbar { float:left; }
body .mceToolbar div {
white-space:normal;
}
Using small toolbar, they are properly layed out as the editor width changes.
"theme_advanced_resizing" should be set to "false". Also, more work is needed to make it work with fullscreen.
Remove Width and height from the TINYMCE_DEFAULT_CONFIG.
then apply your styling normally.
i am using this in the CSS:
div.tox.tox-tinymce {
width: 200px !important;
}
I use !important because tinymce using inline styling for that div, use #media if necessary.
a cropped screenshot from firefox inspector

Empty div gets imaginary border in iPad/iPhone (Safari) browser

I have a page containing an empty div with a gradient in it, like this:
<div class="prodGradientArea"></div>
.prodGradientArea {
background: -moz-linear-gradient(center bottom , #ECEAE9 0%, #E4E3E2 50%) repeat scroll 0 0 transparent;
display: inline-block;
float: left;
height: 10px;
width: 420px;
}
This looks brilliant in FF, IE, Chrome and Safari ... on a computer. When checked in Safari on an iPad or iPhone, I get a tiny border around the div. This is removed if I write text in the box or if I zoom in a lot but not if I write a non-breaking white space. I have even tried putting in a transparent pixel with but it made no difference to the imaginary border. Also tried setting border=0 but this was of course not the problem (it is not a real border, just a visual "feature").
So the only thing that removes it is to add pure text. I guess I can add a dot and hide it with color or so but it would break my little heart to make such an ugly fix.
Please help!
Jenny
Insert in your index.php this code in the <head>-area to avoid artifacts from bad zoom interpretation of iOS:
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
Then go to your css-file and insert a 1px negative margin, to avoid this. In my website this was the footer div:
.unten {
margin-top: -1px;
}
I hope this will help you, too!