MacRankin Posted February 23, 2009 Report Share Posted February 23, 2009 Just wanted to share with you this piece of code for anchoring an image in both the bottom left-hand side and top right-hand side of the viewport or browser window... html { margin: 0; position: relative; background: #000 url(images/floral_top.jpg) no-repeat top right; } body { margin: 0 auto; font-size: small; position: relative; background: url(images/floral_base.jpg) no-repeat bottom left; } Simple, isn't it. Of course, I've done something similar in the past in creating 2 and even the appearance of 3 background colors, but that was to create the illusion of a 3-column layout. Just a little web page I'm designing for someone. (narrow view) And a widened image of the same layout and backgrounds... Quote Link to comment Share on other sites More sharing options...
imeera Posted February 24, 2009 Report Share Posted February 24, 2009 Great, I like it, may I use this Code...? Quote Link to comment Share on other sites More sharing options...
MacRankin Posted February 24, 2009 Author Report Share Posted February 24, 2009 Yes, of course you can, and anyone else, for that matter. I really don't see the point in some peeps expecting the web community to seek their permission to use their tips and tricks, and only for use with personal or on non-commercially built sites. I mean, they should either share what they've found with others, charge a little something, or ask for a donation of appreciation. I'm ok with any of those examples, as I myself have occasionally bought and donated monies for the odd dynamic code or two. Incidentally, I replaced that horrible scrollbar with a scrolling javascript. I've just got to create a nicer set of arrow graphics for it. I also, as it happens, incorporated Eric's opacity trickery thingy, which I pinched from his website, here.. http://www.visibilityinherit.com/code/css-opacity.php Without tips, tricks, and other cool tool treasure chests like his we wouldn't be able to share anything. Quote Link to comment Share on other sites More sharing options...
imeera Posted February 24, 2009 Report Share Posted February 24, 2009 Thank you very much, I am completely agree with you. Yes I know Eric have very cool tips, tricks on tools page. I get lots of help from there. :cool: Thank you MacRankin and Eric, keep the good work rolling.... Quote Link to comment Share on other sites More sharing options...
MacRankin Posted February 24, 2009 Author Report Share Posted February 24, 2009 I've put together a little web page, so that you, and anyone else can play around with it. Funnily enough, this background image trickery thingy seems to work in every browser I've got, though I am having a few probs with it in IE6, though that's probably down to the suckerfish nav I'm using. Then again, I guess as long as you're not trying to create solutions for everything you can't do, as I do from time to time, then I guess there's bound to be some quirks appearing every now and then. Anyway, about that page... http://www.macrankin.co.uk/web_filez/background_prep.html Btw, The background graphic(s) -- originally one, though bought by me, are not mine to give away, so you'll have to use your own. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.