PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.CSS > Background Padding not working
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Background Padding not working

Réponse
 
LinkBack Outils de la discussion
Vieux 01/03/2008, 00h02   #1
shapper
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Background Padding not working

Hello,

I am applying a background to my table header.
I want the background to be applied to each table cell but having a
padding of 1px.
So, in each header cell the background will have a white line around
it not touching the border.

How can I do this?

I have the following but it is not working:

..Grid thead th
{
background: url(Images/GridHeaderBackground.jpg) repeat-x;
padding: 4px;
text-align: left;
}

Thank You,
Miguel
  Réponse avec citation
Vieux 01/03/2008, 08h23   #2
Johannes Koch
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Background Padding not working

shapper schrieb:
> I am applying a background to my table header.
> I want the background to be applied to each table cell but having a
> padding of 1px.
> So, in each header cell the background will have a white line around
> it not touching the border.


table {
border-collapse: collapse;
}
?

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
  Réponse avec citation
Vieux 01/03/2008, 16h09   #3
Ben C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Background Padding not working

On 2008-03-01, shapper <mdmoura@gmail.com> wrote:
> Hello,
>
> I am applying a background to my table header.
> I want the background to be applied to each table cell but having a
> padding of 1px.
> So, in each header cell the background will have a white line around
> it not touching the border.
>
> How can I do this?


You can't. The background image goes right up to the border, that's just
the way it's defined.

You could edit the image to put a 1px white line at the bottom. Then
inside the <th> nest a div with 1px top left and right white borders.

This will work since your image is only repeat-x and not -y. But it
illustrates another problem which is that you don't know the height the
th is going to be (it depends on the user's font). But perhaps you don't
mind a bigger gap or no gap below the image.

> I have the following but it is not working:
>
> .Grid thead th { background: url(Images/GridHeaderBackground.jpg)
> repeat-x; padding: 4px; text-align: left; }
>
> Thank You, Miguel

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 14h39.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09571 seconds with 11 queries