Hey folks, I'm attempting to style a client's article h1's with a simple background color and padding. I need the text to be centered vertically and horizontally within the padding, but I'm finding there's a baseline difference between OS X and Windows. At least that's my best guess. Here's the specific code for the offending elements:
.entry-title {
color: #fff;
background: #A3BCC3;
font-size: 24px;
text-transform: uppercase;
text-align: center;
}
.normal .entry-title {
float: left;
width: 100%;
padding: 10px;
margin-bottom: 30px;
}
Here are the screenshots:
OS X: http://i54.tinypic.com/2a0bx1v.png
Windows: http://i56.tinypic.com/2gv4vie.png
You'll notice it's rendering just fine on Windows, but it's a few px too high on OS X. They render the same throughout browsers, the only difference is between the operating systems. The font is Quicksand Book, and is being implemented via #font-face. If you need to see a working version of the site, it's available at http: // angryg.nom.es/rosebud. If you do manage to check it out, you'll notice I'm having the same problem on the static content footer at the bottom of the home page.
Anyway, any help would be greatly appreciated.
You need to specify a line-height for the specific browser (painfull) use this type of properties: 1.1, etc over specifying pixels, from my experience it works better.
Also, still in the Mac, between Safari and Firefox you'll notice a difference between line-heights! So this isn't just OSX vs Windows.
Your font-files may be incorrect.
I had the same issue with a local installed webfont too.
Thankfully Google provided the same font as a webfont, solved the problem for me.
Default font of operating systems is different so add a font-family: Arial to your elements css. It should work in OSX and Windows because Arial is supported by both of them.
Related
When on the site and using IE, it is not possible to type in the text fields, the two textareas work ok. Please can someone go to this site and look at 'view source' and tell me why it is not possible to type in the text fields while using IE? I am really struggling to fix this
The text is there, just hidden. I proved this by writing something in there then shift + left arrow to highlight whatever (if anything was in there) and copying it out. It worked.
In terms of the issue it seems to be linked to the padding size. 16px with a 28px max-height. 16x2(top and bottom) being 32 and whatnot doesn't leave much room for the font ;). Now as to why Chrome is smart enough to take your 32px and 0 height element and make it show text, I don't know, supposedly its just better. Cue all the clever people now that will explain the intricacies of how IE and Chrome deal with these issues (or will link some already enlightening posts). By the by, it doesn't work in Firefox either without a fix.
Anyways the CSS below is the issue. Lines 3773 and 675 of your style.css. Changing the padding to something like 5px would make it 10px + 18px font size which is right on the 28px max-height. Oh and I don't know anything about WP so have no idea why or how or when or who or whatever the CSS file is generated by, but assume you can just modify it for now to get it working.
input, select, textarea {
background-color: #fff;
border: 1px solid #ddd;
color: #333;
font-size: 18px;
font-weight: 300;
padding: 5px;
width: 100%;
max-width: 500px;
max-height: 28px;
}
I'm trying to design something similar to GitHubs sliding file browser
It's mostly working but im trying to style it and I get this with my borders:
.claim-header, .support-header{
text-align: center;
background-color: $argument-review-banners;
padding: 0.3em;
font-family: "Jockey One",Arial,Georgia,sans-serif;
font-style: normal;
font-weight: 400;
font-size: 20px; // <--- this line breaks it
text-transform: uppercase;
border-color: black;
border-style: solid;
}
it appears as if the font-size within the div (each one of these rows is a div as it's not really a table, as I'm not doing file browsing per se) is what breaks it, it seems to make the calculation of the width different because of font-size. I thought that susy caculates widths based on the base-font, not the font of the element. It's off by 2 pixels and I wonder if this is some sort of rounding error.
I could fix it with yet another wrapper div. But I'm wondering what the proper solution would be.
This issue is not related to Susy - you would have the same problem with any em-based width. Susy has no way of knowing that you changed the font size, or want to use a different em value - that all gets calculated at the browser level.
The container mixin will output the same em width each place you use it (given the same settings), but em's are relative to local font-size. That's calculated by the browser, and Susy has no knowledge of it, or control over it. There are several options.
You can build your grids in rem (root em) values instead, on modern browsers.
You can use the $container-width setting to override the calculated width - use px, %, or set the width .
You can set a single outer container (maybe the <body>?) around all these elements.
You can change the font size in a nested element, rather than on the container.
I've noticed that in some situations, in some browsers, my horizontal overflow scrollbar doesn't show up until you START scrolling. That's not good ... users need to know that there is content beyond what's currently being shown.
Is there a way to make sure that the scrollbar is always shown?
I've seen this issue on Lion, on a MacBook, in Safari, Chrome.
Since you're using Lion, check System Preferences > General > Show scroll bars. This is an OS preference.
The three options are:
Automatically based on input device
When scrolling
Always
This is a "feature" they're trying to carry over from the iOS. That said, you can try something like this:
::-webkit-scrollbar {
-webkit-appearance: none;
width: 7px;
}
::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: rgba(0,0,0,.5);
-webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
}
http://www.hardcode.nl/subcategory_2/article_575-force-scrollbars-on-mac-os-lion-webkit.htm
Well, there really isn't a way around this without creating your own scrollbar. So I opted to created a custom button navigation.
I am getting a horizontal scroll bar in IE6. Attached the path to zip folder. Download and open index.html page in IE6. Let me know how to remove the scroll bar.IE6-horizontal-scroll bar
Its one or more bad values in paddings. Try replacing all "padding" with "xxx" for a moment and you'll see that the problem disappears.
You also need to study the broken box model on IE.
Solution:
Replace all padding: 10px with padding: 10px 0;
Fix what does not look right (padding wise)
You need to set the horizontal padding of div#container to zero too. You're only setting the top padding in skin-ie.css to zero now. Change padding-top: 0px in skin-ie.css to padding: 0 (the px is unnecessary for zero).
tried
html{
width:100%;
overflow-x: hidden;
}
body{
width:100%;
overflow-x: hidden;
}
yet?
EDIT:
This works but hides right side edge content. See the link screenshot. http://shivanand.in/temp/rightside-edges-hidden.gif – Shivanand
Hmm, that is weird. Are you using any position: absolute DIVs with width set in pixels (not %) that are causing this to happen?
I have a website that is perfectely centered aligned. The CSS code works fine. The problem doesn't really have to do with CSS. I have headers for each page that perfectely match eachother.
However, when the content gets larger, Opera and FireFox show a scrollbar at the left so you can scroll to the content not on the screen. This makes my site jump a few pixels to the left. Thus the headers are not perfectely aligned anymore.
IE always has a scrollbar, so the site never jumps around in IE.
Does anyone know a JavaScript/CSS/HTML solution for this problem?
I use
html { overflow-y: scroll; }
To standardize the scrollbar behavior in IE and FF
FWIW: I use
html { height: 101%; }
to force scrollbars to always appear in Firefox.
Are you aligning with percentage widths or fixed widths? I'm also guessing you're applying a background to the body - I've had this problem myself.
It'll be much easier to help you if you upload the page so we can see the source code however.
#middle
{
position: relative;
margin: 0px auto 0px auto;
width: 1000px;
max-width: 1000px;
}
is my centered DIV
Well you don't need the position: relative; - it should work fine without it.
I take it that div has to be 1000px wide? It would still be a lot easier to answer this with the actual website.