ajnabi: beautiful indian-looking girl set against the green. (indian smile)
ajnabi ([personal profile] ajnabi) wrote in [community profile] style_system2009-07-25 04:12 pm

browser issues

I've been working on customizing my journal layout. It's the Transmogrified style, though I've modified the css. (I haven't used any layers yet, just worked through the customize journal style wizard).

EDIT:
I've got the layout nearly up to scratch; the only problem is the userpics. They display bigger than they should be in IE and Safari, and I can fix it in IE by specifying a 100x100 width under *+html .userpic, etc (which in firefox makes the border/background too small to cover the picture, and messes it up in general). But I still can't fix it in Safari, so is there a better way to fix it? I tried adjusting the size with min-width and min-height attributes as suggested, but that didn't seem to help either, unfortunately..





I'd appreciate any help whatsoever ~ thank you!
kaigou: this is what I do, darling (live and learn)

[personal profile] kaigou 2009-07-26 12:50 am (UTC)(link)
Could you redo the CSS so it's not inside a textarea? I can't speak for other browsers, but in FFx2.0 that textareas about an inch wide by a quarter-inch high. Otherwise I might be able to help, given that I've spent the past two days bashing Transmog with the keyboard.
kaigou: this is what I do, darling (tea and cake)

[personal profile] kaigou 2009-07-26 03:28 am (UTC)(link)
Wow. You've got a lot of stuff in there I've never seen, and I'm not sure if it's just specific things that I've usually avoided with LJ-style css, or what. But I can point out things that I know will sometimes make Safari and/or IE get a little twitchy, or are just basic CSS details that might've scooted past you. (We all go blind after looking at enough of this.)

Body -- you've got background & color listed as same: background: #4E4357; color: #4E4357. Easiest just to not define either, then.

Margin -- instead of "0 auto 0 auto", just use "0 auto". Firefox seems to be more forgiving of this, but when I've done wacky stuff like "0 auto 0 -5px" I know Safari threw a fit, so see what trimming that does for you.

The ljuser b is an alternate for styling, but AFAIK if there's no script to tell html to think 'b href' is equal to 'a href', it will ignore everything except standard 'b href'. I'm not sure what's mucked with your userpics, so I don't know if that's related. (Probably not. Heh.)

Let's see.

BODY is set at... not set.

#container is set at width: 860px; with {margin: 0 auto;} that should center it. hmm.

Widths are set -- culling down to just what's important here, btw, to make easier to do math.
h1.title {width: 500px; margin-right: 165px;}
.navigation {margin-right: 165px; padding: 15px; width: 500px;}

Amirite in guessing you wanted h1 right on top of navigation?

You can probably get rid of this line:
#wrap {padding: 0;margin: 0;}

...because it's a div that goes horizontal, and doesn't seem to have anything in it. That is, it's supposed to, but if you border it, you'll see it's just a horizontal space. Very odd.

Maybe this is part of the issue? By setting content at 0 margin, and being out of the header area and into the body ("content") area, you're telling it to have content set at 800-whatever pixels, with no room allowed for the sidebar.

#content {margin: 0;}

Thing is, when I do a screenshot of your screen, it's giving me like 700px wide, and I'm going to guess that's semi-accurate b/c you're not setting fonts based on ems. Hmm.

.entry, .entry-wrapper-odd .entry, .entry-wrapper-even .entry {padding: 10px; margin left&right: 0;}

If content is basically 100% wide, then, and .entry is 100%-20px... I think first what you need to do is set up the content margin to be something like:

.content {margin-right:-160px;}

That'll narrow it to allow the sidebar to move up and slot in on the right. Speaking of sidebar, that says:

.module-section-two {width: 160px; margin-right: 20px;}

Right now, you've got a slot for the sidebar that's giving it enough room in Firefox math and not enough room in Safari/IE math. That's because Firefox reads %s/ems/etc differently than Safari and IE (which oddly react the same way in this instance). So for Firefox, you might be saying, "full width is 100% and main column is 70% so sidebar is 30%"... then you add in margins and padding, and you're fine. But in Safari/IE, the margins are *on top of* the width, or maybe it's padding that's on top of... whatever, the end result is that half the world says "text area = total - margin - padding" and the other half of the world says "text area = total"... and THEN adds in margin/padding.

I'm not exactly sure (hard to say without being able to fiddle with things, but then, I'm a fiddler like that) but my guess is that it's got to do with the allowances for margins and padding being added up differently. What I recall having to do from transmog over the past day or so is:

-- first remove all margins/padding. let it squish up temporarily.
-- set borders on everything that's of question; in this case, .content, .module-section-two, .entry, maybe even .module -- anything you're defining, add something like "border: 2px solid hotpink;" and "border: 2px dashed green" and whatever other basic html colors are good contrast against the background. (I'd even go so far as to do them for as many defined areas as you can come up with basic colors -- orange, yellow, blue, green, etc -- even if it does look crazy at first.)

That will throw off margins (by 4px, hey, it'll do for now) but it'll let you see where things are overlapping or too much/too little. Then compare IE/Safari with Firefox, and reduce the basic widths of each main column (content and module-section-two). Once you have them side-by-side, start adding in margins, then remove if things get pushed, and then try padding as the last thing to balance it out. Once an area's set like you want, turn off the border for that area.

I seem to recall I ended up doing margin-settings on the content and balancing it with padding-settings on the sidebar, or viceversa, but something crazy like that to get Safari/IE and Ffx to look similar. It's all because of that wacky math, and the bizarro-land quirks in Transmog don't exactly help a great deal.

Sorry I couldn't help more, but hopefully that's at least a place to start. At least, based on the hell-time I've had with Safari/IE/Ffx, the most common culprit is often the width + padding + margin being read as different value by each. Good luck!




kaigou: this is what I do, darling (live and learn)

[personal profile] kaigou 2009-07-26 03:31 am (UTC)(link)
Err, I should be clearer about this part:

.module-section-two {width: 160px; margin-right: 20px;}

...this means to Safari (and at least IE6/7, IIRC) that your sidebar is actually 180px --> it's 160px for text area PLUS another 20px for margin. Something like that. So try setting it up for a 180px sidebar and see what that does.

Like I said, I fiddle with stuff until it works. Or doesn't. (Heh.)
kaigou: this is what I do, darling (whedon wisdom)

[personal profile] kaigou 2009-07-27 04:14 am (UTC)(link)
a few notes:

3. I'm so used to the cascading element of css that when I see text defined that early, I think: ahah, something's overriding that later. my own css is often layered to do just that, with exceptions at the bottom for specific overrides.

4. margin: 0 auto is useful, but it also depends on whether you want things centered. sometimes a layout looks better, oddly, if it's shunted to the left. depends on the layout.

there are actually four ways to list values when it comes to margin/padding:
a. there's the standard shorthand, known as TROUBLE -- TRBL, which is top-right-bottom-left. VERY easy to remember, eh?
b. there's the single one, in which one value is applied to all
c. there's the double, where the first value is top-bottom and the second is left-right,
d. there's the rarely-seen triple, which is (erm, I think, I never use this!) the first is top-bottom and then left value and right value? Check www.tizag.com. They've got all sorts of useful info about this stuff.

5. b href works only if you're on a site where b's been defined -- unfortunately, that site will never be LJ/DW/etc, since we can't define globals. grrrr.

6. sounds like an instance where using margin:0 auto isn't visually the best way to do it, in which case try something like margin: 0 auto, and override it with margin-left: 5%, see what that does. (easier than typing each out separately, for me at least.)

8. there is a way to do subtitles! it just means doing wacky layers, b/c they turned off the global on subtitles -- why? I BLOODY WELL DON'T KNOW. Some of the stylistic choices right now have me bashing my head on the keyboard, b/c they're good only for developers and/or folks who really really know their way around. Hell for anyone else. Regardless, I think it's in this comm, as a matter of fact -- check back a few posts and you should see something about subtitles.

11. borders are my soopersekrit tool when it comes to reverse-engineering someone else's css. doing background colors, one will block out the other, which doesn't help so much -- but borders will overlay, especially if background-color is set to transparent. then you can see what's meshing and what's clashing.

hey, you're not alone in being finicky with layouts. I do the same, but I tend towards minimalism, so doing layouts on LJ/DW/etc drives me crazy for all the div-in-div-in-div crap. I lean hard towards grids, and you just can't manage that with pre-set divs like what's here. Eh, well!

Glad it worked out and is looking like you want!
kaigou: this is what I do, darling (tea and cake)

[personal profile] kaigou 2009-07-28 07:14 am (UTC)(link)
Grids are an amazingly powerful method of doing a framework for css, where instead of doing div-div-div, you do a series of 'boxes' that float:left, and each one squishes up to the one to its left. When you hit the max number of boxes for a row, it rolls over to the next row. So if you've got, say, a grid of 12, then you'd do something like this:

~div class="grid_6"~ ...blah blah blah ~/div~
~div class="grid_3"~ ---text here--- ~/div~
~div class="grid_3"~ ---text here--- ~/div~
~div class="grid_6"~ blah blah blah ~/div~

And you'd end up with a series of chunks of info, of which the first is 50% wide (6 being half of 12), then two columns at 25% width each, and there's your 100%, so the next div, being 50% wide, gets pushed down and to the left to start the next 'row'. It takes a bit to get used to, b/c it's not at all like the standard css style, but once you do... it's hard to go back! There's no div-div-div nonsense, except in cases where you want to break a column into sub-columns. The rest of the time, you pile divs into one, instead, like so: ~div class="grid_6 text subleft rounded"~ and so on.

You can find out more info about grids by checking out A List Apart and Smashing Magazine (google them, though I find Smashing to be a friendlier site for its extensive resources, while A List Apart can get talky at times). Also check out these existing frameworks, for info/ideas on getting started playing with them:

http://960.gs/ -- 960 grid system
http://www.blueprintcss.org/ -- the biggest & best known
http://code.google.com/p/emastic/ -- flexible & fluid versions, in 12x and 16x

Several sites that are grids in use and/or demo'd:

http://5thirtyone.com/
http://talkseattle.com/
http://kerrywebster.com/
http://www.subtraction.com/

Those are strongly minimalist themes (since that's my personal pref, so that's what I had bookmarked for ref), but there are plenty on Smashing Mag's site that are anything but minimalist and yet are strongly gridded.

That should be enough to hurt your brain get you started!
mmmag: A cotton cloud with drop shaped beads dangling below. (Default)

[personal profile] mmmag 2009-07-26 03:28 am (UTC)(link)
In IE8 your layout looks fine with the exception of the entry userpics which may have something to do with the height and width requirements you have for them. Try replacing that with min-height and min-width instead. I'm not sure how it looks in IE7 or Safari and it looks terrible in IE6 (so does my layout) and I don't know what to tell you about that other than upgrade your browser.
kaigou: this is what I do, darling (Default)

[personal profile] kaigou 2009-07-26 06:30 pm (UTC)(link)
You must've fiddled with it further, because my Safari shows it looking pretty close to how I see it in Ffx.
kaigou: this is what I do, darling (Default)

[personal profile] kaigou 2009-07-27 03:48 am (UTC)(link)
hey, whatever works. the safari-ie-firefox-opera adjustments can get pretty crazy, and at this point I'm almost convinced it would work just as well to wave a dead chicken over the computer. Sometimes it doesn't seem like anything else will get the job done.