Shifting content left Material UI - css

Has anyone had a problem with Material UI dropdown Select and Modals shift the content to the left? I tried to give it position: absolute I also tried to give the MenuItems position: absolute but the content was still shifted.

You can find information about this here: https://github.com/mui-org/material-ui/issues/10000
There are a number of related issues referenced there as well. There are different ways of fixing it depending on how the main window elements under the modal are being positioned.

In my React app, this worked for me.
<body style="overflow-y: scroll;">
//index.html
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body style="overflow-y: scroll;">
<noscript>
</noscript>
<div id="root"></div>
<script></script>
</body>
</html>

Related

HTML doesn't take full width

I've got a problem with my website. <html> doesn't take full width on mobile.
I'm using Bootstrap + Jquery.
Do you know where my problem comes from .
Thanks !
My guess is that your viewport is off. To correct it, add this meta tag to your head:
<meta name="viewport" content="width=device-width, initial-scale=1">
For more information on the Viewport meta tag, see this MDN
page.
I am sure this is the causing the issue
<div class="container">
<div class="row"> <!--this adds negative margin.-->
<div class="col-x-*">
</div>
</div>
</div>
The structure is compulsory when using bootstrap.

CSS, float:left adds hidden padding?

I'm very new to the html5/css universe.
I'm trying to do something very basic and cannot comprehend why I'm getting the results I am. I would like to add a sidebar to the side of my content. I'm doing this by adding a 310px margin to my content and putting floating my side-content there. Easy!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
div.sidebar{float:left;width:300px;padding:0;background-color:yellow;}
div.content{margin-left:310px;background-color:green;}
</style>
</head>
<body>
<div class="sidebar">
<h1>Sidebar</h1>
</div>
<div class="content">
<h1>Content</h1>
</div>
</body>
</html>
But something odd is happening, there seems to be a 1em padding above and below the sidebar (yellow), but not the content (green). As a consequence the titles "Sidebar" and "Content" are not aligned. I'm just wondering why the float:left automatically added what seems to be padding? And can this padding be removed? padding:0; seems to have no effect.
try this
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
body,html{margin:0;padding:0px}
div.sidebar{display:inline-block;float:left;width:300px;padding:0;background-color:yellow;}
div.content{margin-left:10px;display:inline-block;float:left;background-color:green;}
</style>
</head>
<body>
<div class="sidebar">
<h1>Sidebar</h1>
</div>
<div class="content">
<h1>Content</h1>
</div>
</body>
</html>
Every browser has its own default ‘user agent’ stylesheet, that it uses to make elements appear more legible. For example, most browsers by default make links blue and visited links purple, give tables a certain amount of border and padding, apply variable font-sizes to H1, H2, H3 etc. and a certain amount of padding to almost everything. The padding your are having is because of default browser setting. Try a global reset for elements.
eg: * {margin:0;padding:0}

Footer Ignores Floating Content

I need to make my footer stay on the bottom but also have it not interfere with my content. As seen in the jfiddle, the blue box interferes with the footer. After looking through all the current threads and trying to fix my CSS and HTML, I could not find my solution. I tried changing the position to fixed, adding some padding, etc. Below is my code:
http://jsfiddle.net/9A2gL/8/
Basically I have:
<html><div id="wrapper"><header></header>
<body></body>
<footer></footer></div></html>
I do have floating divs but I used clearfix so clear: both;
Also, please read this: I do have a valid HTML structure but jsfiddle doesn't recommend the tags to be placed. Please focus on the floating aspect as when I take float:right;in the CSS off of the .news it is working. When I remove the code to make the footer stick at the bottom of the page, it also works.
Your HTML Mark is Messed Please first of all W3C Stabdards, and correct your HTML Markup some thing like this
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<header></header>
<footer></footer>
</body>
</html>
Sencond for your footer please apply clearfix class there after proper markup or just
.Clear{
clear:both;
}
You are good to go (y).
I understand it was a fiddle (THANK YOU!), but your HTML tags are out of place. That being said, the image I see from your fiddle is as follows
<div id="wrapper">
<div id="container">
<!-- REMOVED body HTML tag-->
<div id="content">...</div>
<aside>
<div class="advert">..</div>
<div class="news">..</div>
</aside>
<!-- End Container -->
</div>
<div class="clearfix">..</div>
<footer>..</footer>
<!--End Wrapper-->
</div>
edit
Add bottom margin to your aside.
The clearfix div should be added before the end div of container.

Overlaying an image over WP Supersized Plugin full screen background slideshow

I've been struggling with this for days now and I really can't work out how to add an overlay image on top of my full screen slideshow background.
I thought it would be as simple as placing a styled DIV around the supersized 'ul', but I can't even find where to do this.
Here is a link to my site so far: http://www.vinylsoundfiles.co.uk/autonamy
and here is a link to the pattern that I'd like to overlay: http://vinylsoundfiles.co.uk/autonomy/wp-content/themes/garnish/images/header-pattern-light.png
Any help would be MASSIVELY appreciated! Thanks in advance.
Below is my code as shown when I 'inspect element'. You can see the ul at the bottom, which is what I presume I need to put my styled div around, however I don't know where to find this ul element and even if I do find it, I'm not sure if this solution to my objective will work.
[code]
<!DOCTYPE html>
<html class="" lang="en-US">
<head></head>
<body class="home page page-id-45 page-template-default gecko layout-2cl">
<div id="container"></div>
<div id="fancybox-tmp"></div>
<div id="fancybox-loading"></div>
<div id="fancybox-overlay"></div>
<div id="fancybox-wrap"></div>
<ul id="supersized" class="quality" style="visibility: visible;"></ul>
</body>
[code]

In Firefox 2, usage of overflow:hidden makes other divs overlap current div

When I use overflow:hidden for div which is positioned absolute (for menu), other div overlaps. Here is the code. It works fine in FF3. Any help appreciated. Please note that html should be as it is. Also if you can provide solution, just by changing styles of menu div (the div which contains menu text) it is more helpful for me. Thanks in advance
Here is the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Title of the document</title>
</head>
<body>
<div style="position:relative">
<div>
<div style="height:20px;overflow:hidden">
<div style="position:absolute;width:200px;height:100px;top:0px;background-color:black;z-index:1">menu</div>
</div>
</div>
<div style="position:relative;height:200px;background-color:gray;"></div>
</div>
</body>
</html>
Apparently, FF2 has some known issues with overflow and z-index. (See this google search)
There's probably a workaround, but we'll have to know what you're trying to accomplish with overflow: hidden. It's hard to tell from your code because it isn't really having an effect—removing overflow:hidden entirely gets the result you're going for.

Resources