| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Odd CSS; I thought I wasn't that bad... | |
|---|---|
| Tweet Topic Started: Jun 16 2005, 07:59 PM (396 Views) | |
| JoeC | Jun 16 2005, 07:59 PM Post #1 |
|
Euch! IE tastes horrible!
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
...but I've managed to write CSS that validates, shows correctly in IE, but not in FF. Relevant CSS:
(X)HTML:
If anyone can find the problem, I'd be very grateful. Well, no. If you can find the answer I'd be very grateful. The problem is that in FF, the main nav bar (under the logo), 1) The border doesn't go right down to the bottom of the bar, despite the "height: 100%" property 2) The "width: 130px" property isn't kicking in. Both of these are faults only in FF, IE shows them fine (so I'm suspicious of whether I'm wrong or FF is wrong). 3) In either, an old problem - is there any way to vertically align the text to the centre of the cell? Thanks alot for your help. |
![]() |
|
| gamefreak11 | Jun 16 2005, 09:24 PM Post #2 |
![]()
Arcade Coder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I'am not great at css, but should this:
Be:
Maybe that would work? :huh: Edit: Nevermind, it didn't.
|
![]() |
|
| FearKiller | Jun 16 2005, 11:22 PM Post #3 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Add "float: left;" to the link elements. |
![]() |
|
| JoeC | Jun 17 2005, 10:00 AM Post #4 |
|
Euch! IE tastes horrible!
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Thanks, that's fixed the bunched up nav elements, does anyone know how to vertically align text? |
![]() |
|
| FearKiller | Jun 17 2005, 11:19 AM Post #5 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
You can't vertically align text within a DIV. You can get a similar effect by using line-height, but if your line of text were to wrap then it's not gonna look pretty. |
![]() |
|
| Dennis | Jun 17 2005, 11:31 AM Post #6 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Or you could cheat and use <div valign="top/middle/bottom">. |
![]() |
|
| FearKiller | Jun 17 2005, 11:51 AM Post #7 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
No you can't because that attribute doesn't work on DIVs. It's a table attribute. |
![]() |
|
| JoeC | Jun 17 2005, 11:54 AM Post #8 |
|
Euch! IE tastes horrible!
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
OK, so if I were to alter the line-height, how would I go about centreing the text vertically? Would I just make the line-height the same as the height for the div? |
![]() |
|
| FearKiller | Jun 17 2005, 12:47 PM Post #9 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Making the line height the same size as the DIV should work. |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Technology Chat · Next Topic » |
| Track Topic · E-mail Topic |
4:57 AM Jul 11
|



![]](http://b1.ifrm.com/0/1/0/p601690/pipright.png)




4:57 AM Jul 11