# Aligning text with icons in inline lists?

**URL:** https://forum.kirupa.com/t/aligning-text-with-icons-in-inline-lists/264889
**Category:** web dev
**Created:** [July 1, 2008, 6:34pm UTC](https://forum.kirupa.com/t/aligning-text-with-icons-in-inline-lists/264889 "2008-07-01T18:34:33Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![w1sh](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@w1sh](https://forum.kirupa.com/u/w1sh)
#### Post date: [July 1, 2008, 6:34pm UTC](https://forum.kirupa.com/t/aligning-text-with-icons-in-inline-lists/264889/1 "2008-07-01T18:34:33Z")

</div>

Edit: Solved (refer to post #5)

I can’t figure out which pseudo class or any class/id for that matter to make my text position a little higher with my icons (centered horizontally)… Does anyone know if this is easily remedied? I’ve looked through a couple tutorials on it and a ton of forum posts but they never mention this for some reason.

Temp:  
[http://webs.ashlandctc.org/csimmons/sites/PRetty/pages/clean\_help.htm](http://webs.ashlandctc.org/csimmons/sites/PRetty/pages/clean_help.htm)  
[http://webs.ashlandctc.org/csimmons/sites/PRetty/pages/pretty\_default.css](http://webs.ashlandctc.org/csimmons/sites/PRetty/pages/pretty_default.css)

```auto

#nav {
    font-size:12px;
    letter-spacing:2px;
    font-weight:bold;
    text-transform:uppercase;
    padding:5px;
}
#nav ul {
    padding:0px;
    margin:0px;
}
#nav li {
    display:inline;
}
#nav ul li a {
    margin-bottom:25px;
}

```

Thanks in advance.

@Nobody/Simp - (don’t beat me!)

---

<div class="post-metadata">

### Author: ![redelite](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@redelite](https://forum.kirupa.com/u/redelite)
#### Post date: [July 1, 2008, 6:37pm UTC](https://forum.kirupa.com/t/aligning-text-with-icons-in-inline-lists/264889/2 "2008-07-01T18:37:36Z")

</div>

The easiest way to fix this is to just add a few pixels of padding to the tops of your images…

---

<div class="post-metadata">

### Author: ![w1sh](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@w1sh](https://forum.kirupa.com/u/w1sh)
#### Post date: [July 1, 2008, 6:55pm UTC](https://forum.kirupa.com/t/aligning-text-with-icons-in-inline-lists/264889/3 "2008-07-01T18:55:02Z")

</div>

I assigned all those icon images to the class “nav\_icons” and padding-top:5px; their \*\*\*. Nada. ☹

---

<div class="post-metadata">

### Author: ![redelite](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@redelite](https://forum.kirupa.com/u/redelite)
#### Post date: [July 1, 2008, 6:56pm UTC](https://forum.kirupa.com/t/aligning-text-with-icons-in-inline-lists/264889/4 "2008-07-01T18:56:58Z")

</div>

No no, add padding to the images themselves… in Photoshop (or whatever image editting software you use).

---

<div class="post-metadata">

### Author: ![w1sh](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@w1sh](https://forum.kirupa.com/u/w1sh)
#### Post date: [July 1, 2008, 7:13pm UTC](https://forum.kirupa.com/t/aligning-text-with-icons-in-inline-lists/264889/5 "2008-07-01T19:13:30Z")

</div>

Nah, I want text and icons.  
I’ve wanted to know how to do this forever anyway.

I figured it out. If you add a class to your icons (“nav\_icons”), positive:relative; top:5px; works.  
🙂

The best part was, my boss came in to help me, sat down and started doing it and it came to me, I suggested he tried that, he tried two other things and ignored me, then tried that and it worked. :lol:

---

<div class="post-metadata">

### Author: ![thats\_all\_folks](https://avatars.discourse-cdn.com/v4/letter/t/e0b2c6/32.png) [@thats\_all\_folks](https://forum.kirupa.com/u/thats_all_folks)
#### Post date: [July 1, 2008, 7:31pm UTC](https://forum.kirupa.com/t/aligning-text-with-icons-in-inline-lists/264889/6 "2008-07-01T19:31:23Z")

</div>

W1sh,

Just wondering if your solution is working on all (new) browser and IE 6?

---

<div class="post-metadata">

### Author: ![w1sh](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@w1sh](https://forum.kirupa.com/u/w1sh)
#### Post date: [July 3, 2008, 5:07pm UTC](https://forum.kirupa.com/t/aligning-text-with-icons-in-inline-lists/264889/7 "2008-07-03T17:07:07Z")

</div>

[QUOTE=thats all folks;2352046]W1sh,

Just wondering if your solution is working on all (new) browser and IE 6?[/QUOTE]  
I don’t know. I’m working on another site now, when I get back to that one I’ll figure out a better way to do that which will be compatible with all browsers.

As far as IE6 goes, I don’t care what it does. Screwy thing… I’m gonna start redirecting people to mozilla if that browser sees my page. :asleep:
