Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Is using fractions for padding ok?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #157430
    Anonymous
    Inactive

    I’ve been playing around with CSS coding attempting to understand it and what can be done with it. I’ve found that fractions of numbers can be added to things such as padding. For example I’ve been playing around with the horizontal menu on this page and instead of a whole number of 15px being used for the padding, a fraction of 14.66px was added and it works. I did this because the second “button” over from the right originally had “Forum” and I wanted to replace it with “Join Us” which takes up more space and threw the menu off and stacked it. I notice that some of the words in the buttons are one or two pixels off centre but really not that noticeable. My question is, are there any drawbacks to doing this? I only have Firefox and IE to view this so don’t know if this will work with all browsers.

    Thanks.

    #157431
    Anonymous
    Inactive

    I found that this does not work in IE. After looking at it again, it leaves an extra space in the width of the menu, or stacks the menu after a certain unit is entered, so it isn’t useful after all.

    #157434
    Senff
    Participant

    Indeed, I wouldn’t use this. In my experience, various browsers do different things with it. One browser might interpret 14.5 as 14, another might interpret at at 15. It would make your site very unpredictable, I’d say!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.