While developing, lets say i declared the following css properties
.buttons-pos {
/*margin: 0px 20px;*/
padding: 10px;
display:inline-block;
overflow:hidden;
height:20px;
position: relative;
right:-550px;
background-color: #E6E6E6;
position: relative;
text-align: justify;
border: 1px solid;
border-color: #E6E6E6;
border-radius: 3px;
}
css for two blue buttons:
.checksheet {
/*margin: 0px 20px;*/
left: 400px;
top: 45px;
position: relative;
}
.nchecksheet {
/*margin: 0px 20px;*/
left: 680px;
top:2px;
position: relative;
}
This looks perfectly fine in my computer but when i check at other computers.. the position is all messed up?
What is a way to solve this issue?
Attached screen shot.
Ignore the gray bar...for now..
The blue buttons you see..
That is the in the center of screen in my laptop..
But here.. it has shifted to left.
If I look this in my laptop..
The blue buttons will be in the center of my screen
but the gray bar will be shifted on right..
I didn't go through your code in depth, but your problem is almost certainly because of hardcoding the positions and dimensions in pixels. When you design on a higher resolution device and later check on lower resolutions devices, you'll find that your layout is messed up.
You should probably use percentages in laying out your page if you want it to be fluid.
Another solution, which might suit your needs better is designing for the lowest common denominator. This essentially means, in this case, that you decide what the lowest resolution your page will be displayed on is, and then design for that resolution, centering the page for other resolutions.
Related
my border is moving when you have the download file ?tab? open on chrome (haven't tested it with any other browser). This completely destroys the look of my website, the text is still in the same position but the border and background moves up a bit.... I have tried every position but it didn't work... I'm really annoyed at this problem, any help would be appreciated.
here is the css code
.classA {
border: 5px solid;
text-align: left;
line-height: 0.5;
position: fixed;
height: 11%;
top: 110px;
right: 5px;
left: 5px;
}
This is simply how Chrome works when you start a download. You can work around this with css, but please provide us with some code or a demo with what you've already tried.
A quick thought:
The first thing that comes to mind is to not use percentage for your height property, since it takes 11% of the current height, which depletes when you get the download bar in your screen, since the download bar takes up space of your screen.
If you give the class a fixed height, for example 100 pixels, you will see the class won't decrease in height.
So the code will be:
.classA {
border: 5px solid;
text-align: left;
line-height: 0.5;
position: fixed;
height: 100px; /* just an example, does not need to be 100px */
top: 110px;
right: 5px;
left: 5px;
}
need some help with a website I'm working on.
Portrait mode on Android looks like this:
Now, landscape, no css change:
No problem whatsoever. Follow me to the next screenshot illustrating what happens on iOs Safari/Chrome in portrait mode. Everything fine:
Landscape mode goes to "fullscreen" since it's an SE so I figured the screen, being quite small, goes full screen and that still looks fine.
I can scroll through the content no problem. However, when I click a link to go to another page this happens:
The behavior of the page is quite simple: the scrollable content is inside a div which is the rounded one which mustn't move during scrolling. What happens is that the rounded div is set to be 100% height of the screen and when top and bottom navbars appear on iOs, the rounded div won't change its height to adapt to the usable screen part.
body css is as following:
body {
margin: 0;
height: 100%;
overflow: hidden;
-webkit-text-size-adjust: 100%; }
while rounded corners div is managed like this:
.rcorners {
position: absolute;
margin-top:15px;
margin-bottom:15px;
margin-left:15px;
margin-right:15px;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%-20px;
height: 100%-20px;
background-color: white;
border-radius: 10px;
-moz-box-shadow: 0 0 6px 2px #C0C0C0;
-webkit-box-shadow: 0 0 6px 2px #C0C0C0;
box-shadow: 0 0 6px 2px #C0C0C0;
overflow:hidden; }
Any ideas on how to make the height right everytime the usable screen size changes?
Thank you
So sadly iOS has been notorious for this type of stuff for what seems years. First it was the top address bar, and now it is the browser menu. So you have a couple options. YOu can set a media query for landscape and shorten the height of that container and just have it scroll if you need. Could probably drop font-size too. Or there are a couple options in this article that might help.
You could also try 100vh instead as well. As that will make it the full height of the available viewport which I have seen at times act the way I needed it to vs 100% height.
https://www.eventbrite.com/engineering/mobile-safari-why/
Even though I've set a max width/height for my image element, it'll still extend upwards when I zoom in on the page. Any help here :)?
.column img {
width: 80%;
height:450px;
max-height:450px;
min-height:450px;
max-width:80%;
border-radius: 50%;
border: 1px solid black;
margin-bottom: 20px;
box-shadow: 6px 6px 6px #000;
}
website 100% view
website 120% view
I know 1 way to solve this if you want with CSS only.
With CSS: you can make break points in your page. So in resolutions that you set your page will be responsive. You can check This . And you can not use (%) for solve your problem. Only with px. If you set
height:450px;width:450px;
this will work for the circle but will not be responsive. And the px of width must be the same with height. And the BootStrap is some files that can help you with the responsive design.
I have a layout that has a side menu bar and then the main content displayed on the right side. The layout and functionality work just fine except for one minor detail -
In some cases, there isnt enough content to fill the entire screen and when that happens the DIV containing the main content does not stretch and fill the remainder of the screen creating a visual difference as seen in the screenshot. I tried manipulating various attributes and putting in dummy content etc but could not find a clean solution. I am hoping someone can help. I am using Twitter Bootstrap 3.x
I have included the CSS for the main section, ideally, I would like this white background to fill the screen upto the footer.
/*
* Main content
*/
.main {
padding: 20px;
background-color: #fff;
border-left: 1px solid #dae3e9;
height: 100%;
box-shadow: -3px 3px 3px -2px #f1f1f3;
}
I have also created a fiddle with my code, the visual is a little messed up because the output is trapped inside a frame - but here it is anyway -
Dont use min-width: 100%; on your #wrap.
Basically solves the problem.
But i want the footer to still be at bottom etc...
Fiddle
Added:
.main::before {
content: "";
position: absolute;
z-index:-1;
display: block;
width: 100%;
margin-left: -20px;
height: 100vh;
border: 1px solid black;
background-color:white;
}
Suggestion: clean up your code. you don't need that much html code the design your doing. I't will be hell for any one who want to edit or change it at a later stage.
I have two screens my laptop screen and my extended TV screen.
When I view my webpage through my laptop screen I see this.
However when I change the zoom or view webpage through my TV it looks like this.
For clarity I would like my images to be in the same position regardless of the size of the window. Thus the Android picture should always be underneath the contact button.
The images are spawned through CSS and is below. I believe that the HTML code is irrelevant since I just declare the links. (Those images are actually clickable)
#Resume{ /* The MY Name Image */
background-image: url(Resume_Button.png);
postion:relative;
display: block;
border: .25em solid #FF0004;
height:22em;
margin-top:10em;
overflow: hidden;
text-indent: 200%; <!--For Removing the hyperlink (Not Clean) -->
white-space:nowrap;
width: 31em;
}
#Resume:hover{
border: 1em solid #FF0004;
}
#Personal_Projects{ /* Android Button */
background-image:url(android-logo2.png);
postion:fixed;
background-position:right;
display: block;
height:18em;
margin-top:1.5em;
margin-left:55em;
border: 0.25em solid #FF0004;
overflow:hidden;
white-space:nowrap;
width:20em;
}
#Personal_Projects:hover{
border: 1em solid #FF0004;
}
Any help is truly appreciated.
Write Margin, Height and Width Properties values in Pixels rather than em.