|
|
Vertically-Centered Images :(
|
|
|
|
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status:
Offline
|
|
I made a quick example page (css in the head) that shows 3 basic situations where images are not aligned properly (vertically). Many people have different ideas for how to handle these but I'm not really a big fan of any ideas I've heard so far. Is there no way in CSS to just "nudge" an image down, or up, without effecting it's container? Also note that the Login button isn't in standard image, it's a form input element.
Vertically Align Images
I'm not thrilled with using span's with background images, in place of regular <img>'s, but if that's the only way to do it... so be it. But that hack won't work on my form button.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
There is a way...
position:relative
top:5px
or
position:relative
top:-5px
background images and background position are semantically better for this sort of thing though, since the images are a part of the template, not the actual page content. Why are you against background images?
|
|
|
|
|
|
|
|
|
Moderator
Join Date: Jun 2000
Location: inside 128, north of 90
Status:
Offline
|
|
looks like you solved it!
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Looks good! I see why you didn't want to use background images for the Humm-Dingers nav item!
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status:
Offline
|
|
Yup, besson3c's way worked very well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|