|
Posted by Ben C on 03/23/07 14:07
On 2007-03-23, Jon Slaughter <Jon_Slaughter@Hotmail.com> wrote:
> For my page I used padding to position some elements properly(I could not
> set there position directly cause it just wasn't working right. Setting left
> would not work but using padding-left does) and I'm wondering if I should
> instead have used margins? Would there be any reason not to using padding
> and if so would there be any preference to using margins? Or just I just try
> and find a better way?
See http://www.w3.org/TR/CSS21/box.html
left only applies to positioned boxes, padding is inside the border,
margin is outside.
> http://www.jonslaughter.com/MyPage.html
>
> Maybe someone who has a little free time and doesn't mind could take a look
> at the code and see if there is any better way I could achieve the same
> effect. I'm a little worried about sorta hacking things to make it work. It
> does work with firefox 2 and IE7 but I'd like it to work with other browsers
> if possible(if I would just need to change a little code to make it so).
>
> For example, I use the css attribute height and width but I can also set the
> height and width in the html tag directly. Which one do I use? Do I use
> both? (for web browsers that don't use CSS).
Use CSS. If the browser doesn't use CSS it's probably better to let it
decide what heights and widths (sounds, frequencies, ...) to make
things itself.
Navigation:
[Reply to this message]
|