473,387 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Vertical center on images and text at the same line

I am trying to create a breadcrumb with both icons and text, looking
like:

[img] Home > [img] Trail > [img] Trail

Now, how on earth do I get the images and text to vertically align so
that the vertical center of the text is identical to the vertical center
of the images, with margins top and bottom as well as borders top and
bottom? And retain cross-browser compability?

-e

--
egil helland - http://egil.net
Feb 22 '06 #1
13 3114
eg*********@egil.net (Egil Helland) wrote:
I am trying to create a breadcrumb with both icons and text, looking
like:

[img] Home > [img] Trail > [img] Trail
What are the images for? They seem at best useless, maybe worse.
Now, how on earth do I get the images and text to vertically align so
that the vertical center of the text is identical to the vertical center
of the images, with margins top and bottom as well as borders top and
bottom? And retain cross-browser compability?


How are the images coded, in the HTML or in CSS?

--
Spartanicus
Feb 22 '06 #2
Spartanicus <in*****@invalid.invalid> wrote:
eg*********@egil.net (Egil Helland) wrote:
I am trying to create a breadcrumb with both icons and text, looking
like:

[img] Home > [img] Trail > [img] Trail


What are the images for? They seem at best useless, maybe worse.

Probably worse...
Now, how on earth do I get the images and text to vertically align so
that the vertical center of the text is identical to the vertical center
of the images, with margins top and bottom as well as borders top and
bottom? And retain cross-browser compability?


How are the images coded, in the HTML or in CSS?


HTML

--
egil helland - http://egil.net
Feb 22 '06 #3
eg*********@egil.net (Egil Helland) wrote:
>[img] Home > [img] Trail > [img] Trail


What are the images for? They seem at best useless, maybe worse.

Probably worse...


Then you should remove them.

--
Spartanicus
Feb 22 '06 #4
Spartanicus <in*****@invalid.invalid> wrote:
eg*********@egil.net (Egil Helland) wrote:
>[img] Home > [img] Trail > [img] Trail

What are the images for? They seem at best useless, maybe worse.

Probably worse...


Then you should remove them.


I would like to know how to do positioning like this, regardless of
whether you find the images useless here or not.

--
egil helland - http://egil.net
Feb 22 '06 #5
eg*********@egil.net (Egil Helland) wrote:
>> >[img] Home > [img] Trail > [img] Trail
>>
>> What are the images for? They seem at best useless, maybe worse.
>>
>Probably worse...


Then you should remove them.


I would like to know how to do positioning like this, regardless of
whether you find the images useless here or not.


This is a discussion group, post here and we'll discuss the implications
of what you want to do. If you're lucky you'll get good advice on best
authoring practices. It's coincidental if that happens to match what you
want to do.

--
Spartanicus
Feb 22 '06 #6
eg*********@egil.net (Egil Helland) wrote in
news:1hb5xrw.k4enge12nb96wN%eg*********@egil.net:
I am trying to create a breadcrumb with both icons and text, looking
like:

[img] Home > [img] Trail > [img] Trail

Now, how on earth do I get the images and text to vertically align
so that the vertical center of the text is identical to the vertical
center of the images, with margins top and bottom as well as borders
top and bottom? And retain cross-browser compability?

-e


See http://alamo-smccann.nmsu.edu/ and hover over one of the menu items
below the row of pictures. Is that kind of what you want?

<div id="primaryNav">
<ul>
<li id="current"><a href="/students/">Current Students</a></li>
<li id="prospective"><a href="/prospective/">Prospective Students
</a></li>
<li id="faculty"><a href="/facstaff/">Faculty &amp; Staff</a>
</li>
<li id="alumni"><a href="/alumni/">Alumni</a></li>
<li id="visitors"><a href="/visitors/">Visitors</a></li>
</ul>
</div>

#primaryNav a:hover, #primaryNav a:active {
color:white;
background-color:#882345;
background: url("/image/arrow.gif") no-repeat left;
}
Note how the image is placed in the background. You could also use the
image with #primaryNav a:link, #primaryNav a:visited if you wanted it
visible all the time.
Then apply text-align:center to #primaryNav

HTH

--
Stan McCann, "Uncle Pirate" http://stanmccann.us/
Webmaster, NMSU at Alamogordo http://alamo.nmsu.edu/
Now blocking Google Grouper posts and replies.
http://blinkynet.net/comp/uip5.html
Feb 22 '06 #7
Stan McCann <me@stanmccann.us> wrote:
eg*********@egil.net (Egil Helland) wrote in
news:1hb5xrw.k4enge12nb96wN%eg*********@egil.net:
I am trying to create a breadcrumb with both icons and text, looking
like:

[img] Home > [img] Trail > [img] Trail

Now, how on earth do I get the images and text to vertically align
so that the vertical center of the text is identical to the vertical
center of the images, with margins top and bottom as well as borders
top and bottom? And retain cross-browser compability?

-e


See http://alamo-smccann.nmsu.edu/ and hover over one of the menu items
below the row of pictures. Is that kind of what you want?

<div id="primaryNav">
<ul>
<li id="current"><a href="/students/">Current Students</a></li>
<li id="prospective"><a href="/prospective/">Prospective Students
</a></li>
<li id="faculty"><a href="/facstaff/">Faculty &amp; Staff</a>
</li>
<li id="alumni"><a href="/alumni/">Alumni</a></li>
<li id="visitors"><a href="/visitors/">Visitors</a></li>
</ul>
</div>

#primaryNav a:hover, #primaryNav a:active {
color:white;
background-color:#882345;
background: url("/image/arrow.gif") no-repeat left;
}
Note how the image is placed in the background. You could also use the
image with #primaryNav a:link, #primaryNav a:visited if you wanted it
visible all the time.
Then apply text-align:center to #primaryNav

HTH


GRRRREAT! Thanks a lot, this was exactly what I wanted! :) You made my
day :)

-e

--
egil helland - http://egil.net
Feb 22 '06 #8
Spartanicus <in*****@invalid.invalid> wrote:
eg*********@egil.net (Egil Helland) wrote:
>> >[img] Home > [img] Trail > [img] Trail
>>
>> What are the images for? They seem at best useless, maybe worse.
>>
>Probably worse...

Then you should remove them.


I would like to know how to do positioning like this, regardless of
whether you find the images useless here or not.


This is a discussion group, post here and we'll discuss the implications
of what you want to do. If you're lucky you'll get good advice on best
authoring practices. It's coincidental if that happens to match what you
want to do.


Wow, so you are the stylesheets group police? I did not notice those
stars and stripes on your shoulder! I worship you and the ground that
you walk on :)

Just rant and troll on all you want, I got a superb answer right on
topic from Stan McCann. Have a nice day! ;)

-e

--
egil helland - http://egil.net
Feb 22 '06 #9
Egil Helland wrote:
Wow, so you are the stylesheets group police?


No one ever expects the Stylesheets Group Police!

--
chromatic aberration
Feb 23 '06 #10
chromatic_aberration <ch******************@direkte.org> wrote:
Egil Helland wrote:
Wow, so you are the stylesheets group police?


No one ever expects the Stylesheets Group Police!


Hehe! And what is your chief weapon?? Suprise? :)

-e

--
egil helland - http://egil.net
Feb 23 '06 #11
In article <1h*******************************@egil.net>, Egil Helland writes:
chromatic_aberration <ch******************@direkte.org> wrote:
Egil Helland wrote:
> Wow, so you are the stylesheets group police?


No one ever expects the Stylesheets Group Police!


Hehe! And what is your chief weapon?? Suprise? :)


And validation! Surprise and validation is^W are our two chief weapons!

--
Michael F. Stemper
#include <Standard_Disclaimer>
If it's "tourist season", where do I get my license?

Feb 23 '06 #12
Michael Stemper <ms******@siemens-emis.com> wrote:
In article <1h*******************************@egil.net>, Egil Helland writes:
chromatic_aberration <ch******************@direkte.org> wrote:
Egil Helland wrote: Wow, so you are the stylesheets group police?

No one ever expects the Stylesheets Group Police!


Hehe! And what is your chief weapon?? Suprise? :)


And validation! Surprise and validation is^W are our two chief weapons!


ROFL! :)

-e

--
egil helland - http://egil.net
Feb 23 '06 #13
Michael Stemper wrote:
> Wow, so you are the stylesheets group police?

No one ever expects the Stylesheets Group Police!


Hehe! And what is your chief weapon?? Suprise? :)


And validation! Surprise and validation is^W are our two chief weapons!


Our *three* weapons are surprise, validation... and an almost fanatical
devotion to the W3C!

--
Chromatic Aberration
Feb 25 '06 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: chris_culley | last post by:
Hi, I'm fairly new to using css, and have been using it to format a vertical navigation bar on my website, producing a load of buttons on top of each other, each with a (151 * 33 px) gif as the...
2
by: Eric Lindsay | last post by:
If I want to have the middle of an image vertically aligned with the middle of a heading (or several lines of heading), is there some particular way people would recommend? vertical-align: center...
3
by: acunnon | last post by:
I am trying to put together an login page my problem is getting the three items aligned to the middle verticaly without specifing a height to anything on the page. CSS html{ height:100%;...
1
by: judacris | last post by:
I've seen the threads here about molding 2 divs in a centered fashion. but I can't seem to solve this thing. my blogger blog is functioning well on my site for now, but the blog feed (left) and...
8
by: ayamopamo | last post by:
Hi- I am trying to center a web page. It seems like this should be very simple to do, but apparently it isn't my day. I have successfully centered the background by calling it in the css body tag:...
13
by: Bill | last post by:
Hi How can I have IE7 act correctly on that ? The rules make the link text go down when hovered. It works in FF , I had to add a hard space right after the LI tag to have OP9 work but I can't...
24
by: GloStix | last post by:
I'm trying to center this banner, it's in a div that has the same width so it's not exactly "centering" but it's screwed up, It works in safari but in Firefox it's messed up. I uploaded a Video to...
40
by: maya | last post by:
hi, how do I get text to vertical-align inside a div? http://www.mayacove.com/misc/home.html vertical-align should work, according to this:...
5
by: wastedguitarist | last post by:
hey everyone, i have a site that i have designed in dreamweaver. In firefox, the site looks fine, but in IE the whole thing is vertically missalligned, apart from the header / menu. I have created...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.