ajnabi (
ajnabi) wrote in
style_system2009-07-25 04:12 pm
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
Entry tags:
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!
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!
no subject
no subject
I'd really appreciate the help, yes. thank you :)
no subject
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!
no subject
.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.)
no subject
2. I think I fiddle around with and specify way too many things that most people would just leave alone, like the quickreply forms and subject/month pages. I'm really way too nitpicky and perfectionistic.. that's probably why I have weird stuff in my css that isn't commonly used, heh. Oh well..
3. I specified the body color because I didn't specify the text color anywhere else, except for links. It just seemed easier to specify it once. And the background happens to be the same color because I wanted it to appear as though #container was contiguous with the general body background (and the background-color for #container is also that same color). You know, it probably would be better just to specify colors for the individual sections, though...
4. I've been working on using margin: 0 auto; more than having the 4-point value or whatever you call it -- honestly, I didn't even know there was a way to use only two numbers (top/bottom, left/right) until recently! (and I demonstrate my amateurishness yet again.. heh.) anyway, I've noticed that IE/Safari don't always understand those wacky margin values. Do you think it helps to specify it individually, as in, margin-left, margin-right, margin-top, margin-bottom? I haven't really noticed it helping or changing much, but maybe it does in some instances..
5. Thanks for pointing that out about the b:hover thing! I guess I'm okay with the colors for the ljusers being maybe messed up in IE/Safari sometimes though, as long as it's only the colors.. it does kind of drive me batty which is why I specified it in the first place at all, but, you know, you can't fix everything I guess. (It is VERY annoying to me that .ljuser and b are always confused because the ljusers usually show up in bold, or whatever).
6. Yeah, the body is centered actually, I think, except that it appears like it isn't because the userpic wall of space is also part of the body. So it seems a little off towards the right..
7. I got rid of a lot of the defined widths for a lot of the sub-divs (?) like .navigation, .entry, etc. I just specified the width for #content instead. (which you can see in my updated css in this post. I put it in a (bigger) textarea since it seemed like it was too long to scroll down.. I hope that still works for you, though).
8. Yes, you're right :) I did want h1 above .navigation. I have it disabled in my version, I should probably check to see if it still looks ok when enabled.. I'm somewhat miffed that there's no subtitle class in Transmogrified; sometimes I like to use those things though it's nice to have the subtitle too! heh, nitpickiness again I guess..
9. got rid of #wrap -- it does sound very strange indeed, I hadn't noticed the horizontal thing but I did notice that it seemed to be a rather elusive div. um. I mean, it was easier/better to work with other things, like #content and #container.
10. I fixed up the css by just allowing more #content space (and not defining the widths for every single part of #content, just defining it overall..) -- it seems to work alright. I had to fiddle with the margins for .navigation and some of the other stuff, but it seems to work. I still have widths defined for the archive page and tags page stuff because it seems to fall in other divs and classes. I think it works for now, hopefully.
11. thanks for the really good suggestion about bordering and coloring stuff really wackily in order to figure out exactly how things are slotting up! that's really useful. i did use background-colors to see how things were working out earlier, but i didn't think of using borders and better colors.. hah.
honestly, sometimes i wonder why i make layouts (and keep making them rather than sticking to one, or whatever) when they're this meticulous and frustrating! (i seem to love it anyway..) i don't make as many layouts as a lot of people on layout comms seem to, though.
no subject
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!
no subject
especially that acronym (TROUBLE>TRBL), and i think someone recommended tizag.com to me ages and ages ago but i'd forgotten all about it, so thank you for that, too.
i think i'll come back to the subtitle thing after some time. but yeah.. i guess i was trying to avoid working with layers, as i really don't know S2 coding, i pretty much just copy, paste and ask questions there..
also, yeah, you're right about layouts not always working well when centered, my livejournal layout isn't centered but looks way better, i think, on the left. (though the sidebar positioning has some issues.. and let's not speak of the header that refuses to stay in its proper place in IE. hah.) i think journals with header images usually look better centered.. i'm not really sure why i wanted my dw one centered, actually. hm.
what are grids, though? i mean, in the sense you meant. how are they different from div-in-div-in-div styling? (sorry, i really don't know enough about css/coding..)
♥
no subject
~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 brainget you started!no subject
no subject
i tried fiddling with the min-heights and min-widths like you suggested, but it didn't work.. but i figured it out another way.
i put the border on the .userpic class instead of .userpic img, and removed the width and height descriptors from .userpic img entirely.
and then i added this:
*+html .comment .userpic, *+html .entry .userpic {
width: 100px;
height: 100px;
}
it seems to work..
but thank you very much for the suggestion, and the comment :)
no subject
it seems that only works for IE and not for Safari.. ugh.
I think I'll keep trying the min-height, min-width thing..
no subject
no subject
thank you ♥
no subject
no subject
wouldn't it be so much better if people just used firefox all the time? i mean, if there WAS only one browser... *grr*