Any CSS jocks here?
- roymond
- Beat It
- Posts: 5188
- Joined: Sat Sep 25, 2004 3:42 pm
- Instruments: Guitars, Bass, Vocals, Logic
- Recording Method: Logic X, MacBookPro, Focusrite Scarlett 2i2
- Submitting as: roymond, Dangerous Croutons, Intentionally Left Bank, Moody Vermin
- Pronouns: he/him
- Location: brooklyn
- Contact:
Any CSS jocks here?
Almost silly, but I can't get this to work...
I gotta box.
I wanna:
- Put some text elements in aligned top (this works fine)
- Put an image in, aligned to the bottom (this ain't working)
Here's a screen shot. I'd like the image to sit on the bottom of the containing (blue) box, regardless of how much text is above.
Any help appreciated.
I gotta box.
I wanna:
- Put some text elements in aligned top (this works fine)
- Put an image in, aligned to the bottom (this ain't working)
Here's a screen shot. I'd like the image to sit on the bottom of the containing (blue) box, regardless of how much text is above.
Any help appreciated.
roymond.com | songfights | covers
"Any more chromaticism and you'll have to change your last name to Wagner!" - Frankie Big Face
"Any more chromaticism and you'll have to change your last name to Wagner!" - Frankie Big Face
-
- Push Comes to Shove
- Posts: 314
- Joined: Mon Oct 04, 2004 2:48 pm
- Instruments: Guitar, Lead Vocals
- Recording Method: Renoise, Melodyne
- Submitting as: Southwest Statistic
- Location: Cleveland, OH
- Contact:
- Freddielove
- Somebody Get Me A Doctor
- Posts: 236
- Joined: Tue Sep 28, 2004 3:43 pm
- Location: Houston, Texas
What Lunkhead said basically. You can't put it all into one div as far as I know bc you can only select one direction for everything to align, ie. vertical-align: top. So if you create one div for the text and a second for the picture that should work. You then need one big div to wrap around the whole thing. No need to specify a size for it however, it would be governed by the size of the divs inside it.
Everything But the Girl but without the scary big chinned woman
- Furrypedro
- Furrypedro
- fluffy
- Eruption
- Posts: 11097
- Joined: Sat Sep 25, 2004 10:56 am
- Instruments: sometimes
- Recording Method: Logic Pro X
- Submitting as: Sockpuppet
- Pronouns: she/they
- Location: Seattle-ish
- Contact:
Another way is to use .
CSS is a bit weak in the vertical positioning department, unfortunately.
Also, Lunkhead's solution doesn't work correctly in some browsers, which think that 'absolute' is always screen-relative rather than parent-relative. I think older versions of Firefox had that problem, for example.
Code: Select all
position: relative 0px (height of box - height of image)px
CSS is a bit weak in the vertical positioning department, unfortunately.
Also, Lunkhead's solution doesn't work correctly in some browsers, which think that 'absolute' is always screen-relative rather than parent-relative. I think older versions of Firefox had that problem, for example.
- roymond
- Beat It
- Posts: 5188
- Joined: Sat Sep 25, 2004 3:42 pm
- Instruments: Guitars, Bass, Vocals, Logic
- Recording Method: Logic X, MacBookPro, Focusrite Scarlett 2i2
- Submitting as: roymond, Dangerous Croutons, Intentionally Left Bank, Moody Vermin
- Pronouns: he/him
- Location: brooklyn
- Contact:
Yeah, thanks guys. I haven't found a successful solution yet. I'm tweaking this and likely will change the layout accordingly. Perhaps this is a good thing anyway...creates a different presentation, which may just compliment the idea. I will post when it's ready. Thanks again.
roymond.com | songfights | covers
"Any more chromaticism and you'll have to change your last name to Wagner!" - Frankie Big Face
"Any more chromaticism and you'll have to change your last name to Wagner!" - Frankie Big Face
- fluffy
- Eruption
- Posts: 11097
- Joined: Sat Sep 25, 2004 10:56 am
- Instruments: sometimes
- Recording Method: Logic Pro X
- Submitting as: Sockpuppet
- Pronouns: she/they
- Location: Seattle-ish
- Contact:
Code: Select all
<div style="background-color: blue; text-align: center; width: 500px;">
<div style="float: left; height: 200px;"></div>
Text goes in here.
<div style="clear: left"><img src="broken.gif" alt="ceci n'est pas un image" width=200 height=200 style="border: solid red 1px;"></div>
</div>
- Lunkhead
- You're No Good
- Posts: 8174
- Joined: Sat Sep 25, 2004 12:14 pm
- Instruments: many
- Recording Method: cubase/mac/tascam4x4
- Submitting as: Berkeley Social Scene, Merisan, Tiny Robots
- Pronouns: he/him
- Location: Berkeley, CA
- Contact:
Are you sure? It works for me in Safari 1.3 and Firefox 1.0PR:
http://people.geneticmail.com/sam/css_test.html
I think I've used the same basic idea as in my comment, but I may have done something slightly differently, I dunno.
http://people.geneticmail.com/sam/css_test.html
I think I've used the same basic idea as in my comment, but I may have done something slightly differently, I dunno.
- Freddielove
- Somebody Get Me A Doctor
- Posts: 236
- Joined: Tue Sep 28, 2004 3:43 pm
- Location: Houston, Texas
Yeah, I have made an effort to keep up with web standards and css, but when I see crap like the box model hack it all seems so pointlessly complicated.jb wrote:resisting..... smart-ass.... tables.... remark.....
And try to make a footer that sticks to the bottom of the page, forget it.
Everything But the Girl but without the scary big chinned woman
- Furrypedro
- Furrypedro
-
- Push Comes to Shove
- Posts: 314
- Joined: Mon Oct 04, 2004 2:48 pm
- Instruments: Guitar, Lead Vocals
- Recording Method: Renoise, Melodyne
- Submitting as: Southwest Statistic
- Location: Cleveland, OH
- Contact:
- fluffy
- Eruption
- Posts: 11097
- Joined: Sat Sep 25, 2004 10:56 am
- Instruments: sometimes
- Recording Method: Logic Pro X
- Submitting as: Sockpuppet
- Pronouns: she/they
- Location: Seattle-ish
- Contact:
You have the container as absolute too.Lunkhead wrote:Are you sure? It works for me in Safari 1.3 and Firefox 1.0PR:
http://people.geneticmail.com/sam/css_test.html
I think I've used the same basic idea as in my comment, but I may have done something slightly differently, I dunno.
- fluffy
- Eruption
- Posts: 11097
- Joined: Sat Sep 25, 2004 10:56 am
- Instruments: sometimes
- Recording Method: Logic Pro X
- Submitting as: Sockpuppet
- Pronouns: she/they
- Location: Seattle-ish
- Contact:
Using tables is okay for an initial design, but it makes redesigning a site pointlessly complicated. Even (and sometimes especially) when you're doing stuff which is automatically-generated; you should see how hard it is to keep table-based layouts straight at Amazon. Usually we have web designers which create a template in Dreamweaver and leave placeholders for the programmers to fill in, which is fine for a lot of the fairly-static pages, but some of the newer stuff we're working on makes this REALLY difficult. (Which is why I'm doing all my apps with pure CSS. It really is a lot easier for a lot of things.)Freddielove wrote:Yeah, I have made an effort to keep up with web standards and css, but when I see crap like the box model hack it all seems so pointlessly complicated.jb wrote:resisting..... smart-ass.... tables.... remark.....
And try to make a footer that sticks to the bottom of the page, forget it.
CSS's only real failing, IMO, is the lack of decent vertical sizing/positioning. position:absolute is view-relative, not document-relative (which is retarded), and there's no meaningful way to do vertical centering or bottom-alignment without using position:absolute or ugly float hacks (like the one I posted above) which limit the sorts of layouts you can use.
However, CSS positioning does bring a LOT of power and flexibility that you can't get from pure-table layouts, and CSS+DHTML is just plain <em>beautiful</em> to work with (I really wish I could show off some of the stuff I'm working on). You just have to learn to work with it, and design your interfaces based on the tools you have available. You wouldn't write a song which makes extensive use of chords you can't play and words you can't pronounce, right? (Make the style fit the document.)
Also, the few things which CSS is missing natively can be filled in fairly well using limited Javascript. When you use Javascript as a supplement to HTML+CSS you can get really good results (and if you're smart about it, people who don't have Javascript enabled can still use the site just fine, they just won't get quite the right layout). It's a pity that Javascript has gotten such a bad reputation from idiots who don't know how to program and from assholes who want to ruin things for everyone else. That and MS going out of their way to fragment the language so that nearly every function needs to take two code paths. :/
- Freddielove
- Somebody Get Me A Doctor
- Posts: 236
- Joined: Tue Sep 28, 2004 3:43 pm
- Location: Houston, Texas
True, the great advantage of CSS is the flexibility it offers in the design, and redesign by switching the style sheet. We've all seen the zen garden. Unfortuneately, in replacing one misguded technique (tables) with another a whole new set of hacks and work arounds exists that really aren't a whole lot better than 1 px spacer gifs.
Ok, it is better than that, slightly. But the code bloat that used to exist on html pages now just shifted to 100k+ CSS files. I'm not sure whether that is improvement or not.
Ok, it is better than that, slightly. But the code bloat that used to exist on html pages now just shifted to 100k+ CSS files. I'm not sure whether that is improvement or not.
Everything But the Girl but without the scary big chinned woman
- Furrypedro
- Furrypedro
- Freddielove
- Somebody Get Me A Doctor
- Posts: 236
- Joined: Tue Sep 28, 2004 3:43 pm
- Location: Houston, Texas
- roymond
- Beat It
- Posts: 5188
- Joined: Sat Sep 25, 2004 3:42 pm
- Instruments: Guitars, Bass, Vocals, Logic
- Recording Method: Logic X, MacBookPro, Focusrite Scarlett 2i2
- Submitting as: roymond, Dangerous Croutons, Intentionally Left Bank, Moody Vermin
- Pronouns: he/him
- Location: brooklyn
- Contact:
HAHAHA that's exactly where it went. I wanted to play with clean CSS and bla bla bla but it still falls short for some surprisingly simple concepts, so tables it is. And for this project they work VERY well as dynamically generated containers. Also, embedded styles within the tables makes switching styles easy via the stylesheets, with tables simply dictating the placement of objects.jb wrote:resisting..... smart-ass.... tables.... remark.....
Talk about making things more complicated than they need to be...
roymond.com | songfights | covers
"Any more chromaticism and you'll have to change your last name to Wagner!" - Frankie Big Face
"Any more chromaticism and you'll have to change your last name to Wagner!" - Frankie Big Face