I have been able to center elements with margins equal on both sides in mobile without using bootstrap.
My landing page, however, I have used boostrap columns and centered them. I run into problems with mobile portrait display. Landscape display looks fine, everything is centered.
What I have tried:
-setting width to word container and box to 280px and shrinking my navigation menu accordingly.That didn't work.
I am thinking it might be that I have a width for col-centered of 500px which might be what is wrong.
My site can be viewed # http://lewisdesigns.github.io
the link for your project "www.lewisdesigns.github.io" not working. ok
not an issue but i will like to tell you to remove margin-left and
margin-right and add
"margin:0px auto;"
to css selector of each element (e.g. class/id); besides you can also
try for
"float:none; text-align:center;"
in this case.
Related
This page has a content area where all the posts are held and a side bar. The content and side bar menu are sized properly and fit where they're supposed to in Chrome with the actual posts area taking up the left and the sidebar sitting on the right.
In IE, the images are full-width and I'm not sure of a better way to fix this.
The same issue was occurring where the images were full-width and adding the width:100% attribute to the .htheme_post_image img element seemed to fix the issue. If you view in IE, the two areas are side-by-side. However, if you click on a post.
The side menu is underneath the post and the images/text are full width.
If it helps, I'm in IE 11.0.9600
It seems to be fixed if you remove display: table; from both the .htheme_container class and the .htheme_content class.
This seems to fix your IE issue and has no effect on Chrome, so maybe it's simply not needed. But I did not create this theme, so I have no idea of any side-effects this may cause.
On my website I use pure.css and the navbar consists of more elements than a small screen can display without scrolling. Therefore a scrollbar appears in that case, which I don't want.
I would like the navbar to stay at the top so that the navbar and the content scrolls simultaneously. When I use position:absolute; everything looks even worse. Also the mobile version of that navbar should still work (on mobile screens scrolling though the navbar should still be possible).
I also tried to deactivate overflow-y, but then, obviously, not every element on the navbar is clickable.
If you want that navbar and content scroll simultaneously, you shouldn't use position:fixed.
Remove position:fixed
Add float:left to menu div
Add float:right to content div
If I misunderstood what you want, the comment made by Marco Valente should be nice.
I have been trying to develop a menubar for bootstrap in which the image logo be centerized instead to the usual left of the bar. But the problem is, the right links of the menu bar goes off screen. When I preview the page with a width greater than 2050 pixels, it looks fine.
But when I have something smaller than that, the right links didn't respond to the window change and slid off the page.
Is there any way to fix this? I have been playing around with the col-md-7 and the col-md-offset-3 class of the nav. But it didn't fix the problem, just moves/resizes it around the top.
Here is the link to the snipp of the page. http://bootsnipp.com/snippets/rvGQz
DIV with container class, that wraps your navigation, breaks the layout because of this class actually sets the width:
.container {
width: 1170px;
}
Remove container class from a DIV and that should do a magic for you.
Have you adjusted the media queries for each break point in the grid as you adjust your screen sizes?
http://getbootstrap.com/css/#grid-media-queries
I'm making some chevron style links for my web application, and have followed the tutorial here (breadcrumb links with css) in order to add them to the site. This all works fine. However when I start to shrink the size of the page they rapidly start to pile up on top of each other, and look crap. They remain the same width - whereas I'd like them to gradually shrink in width (and perhaps increase in height to accommodate the contents) as the page size shrinks. Ultimately I'll put in some that point down specifically for the mobile user.
Is it possible to tell bootstrap to shrink a block element or to scale it down as the available page width decreases?
I dont know, but maybe give the block this:
height:auto;
You only need to find the right class in bootstrap.css or bootstrap.min.css.
But if you want to edit somthing please use bootstrap.css and not bootstrap.min.css
I'm trying to make a responsive navigation bar that has undetermined number of links on the left side and a search button on the right side.
Links should be equal width no matter how many, and search button should be 50px wide. Responsive comes into play when screen width is less than 768px.
I'm using CSS table-layout: fixed as well table-cell and table-row properties, depending on screen width.
However, Firefox and Chrome seems to do alright but somehow Safari messes up with those equal width elements when switching back and forth the wide and narrow screen (ie. elements are first table-cells then table-rows and then back again table-cells).
Does anyone how to fix this or maybe come up with better design? Or is this just a Safari 6.0.2 bug?
JSFiddle Demo
found here.
i dont think you need javascript for that
i just added a :hover for form width and another :hover for input, and it fixes the problem on safari, which when you hover text input, form gets 50px width again (if thats what your problem was)
#searchform:hover {
width:250px;
}
#searchform:hover input#s {
display: inline;
}
Try my edit in jsfiddle
JS Fiddle