4 replies [Last post]
thopunk
Offline
Regular
Last seen: 14 years 13 weeks ago
Joined: 2006-04-03
Posts: 21
Points: 0

Hey all. I am trying to make the backgrounds of my links fill the div with their background color. I am using padding now to do it but it doesnt look the same on the browsers. Looks fine in FF Mac, but not Safari and not FF Windows. Here is the link:

http://www.timmelideo.com/new%20design/index.php

PLEASE HELP! I don't want to have to use tables.... unless thats the ONLY way. Thanks!!

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 7 years 36 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Link Background's Fill Height

Set your anchors (<a>) to display: block and give them a width and height.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

thopunk
Offline
Regular
Last seen: 14 years 13 weeks ago
Joined: 2006-04-03
Posts: 21
Points: 0

Link Background's Fill Height

thanks for the response but check it out now. it made a break after all the links and doesnt highlight them all.

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 7 years 36 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Link Background's Fill Height

You should put your links in an unordered list and use float: left or display: inline. Check out Listamatic for good examples: http://css.maxdesign.com.au/listamatic/

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

thopunk
Offline
Regular
Last seen: 14 years 13 weeks ago
Joined: 2006-04-03
Posts: 21
Points: 0

Link Background's Fill Height

thanks for the response! so its sorta working now, but the links are not centered vertically nor horizontally.

EDIT-------------------------------------------------------------------EDIT

figured it out. set the div container to have a hidden overflow and it works. thanks!