SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2005
    Location
    md
    Posts
    180
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    padding in mozilla causing background to expand

    I have a table with divs inside the TDs. I want to position the text that is within these divs. I thought i could use padding on the top and left to move the text slightly where I want it.. The problem is that in mozilla the padding seems to extend the size of the div (which has a fixed height)... anyone have a better solution?

    Thanks!

  2. #2
    SitePoint Wizard bronze trophy bluedreamer's Avatar
    Join Date
    Jul 2005
    Location
    Middle England
    Posts
    3,349
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Padding will expand on any previously stated dimension, so say you defined a height of 25px, adding 5px padding to the top will make it 30px.

    To keep the dimensions try taking the padding out of the height, ie to get height 25px define {height: 20px; padding-top: 5px}


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •