A quick CSS question
Hello guys, long time no see.
I've been learning CSS and it's coming along excellently. I just can't seem to find a solution to my problem though. Maybe you guys can help.
I've got my borders set up, but the text inside goes too far to the edge of the border than I want. It slightly touches the border, is there anyway of setting a two pixel margin or something inside the border? Or do I just have to live with it and just format my text differently?
Thanks in advance,
I also like the new design here, much better : P
JeevesBond posted this at 11:31 — 26th May 2006.
He has: 3,956 posts
Joined: Jun 2002
Hi Shaun, welcome back
There is something called padding in the box model that will do exactly what you want.
Beware the ie box model bug though. Especially if you're setting the widths/heights of your boxes.
a Padded Cell our articles site!
Shaun posted this at 21:51 — 26th May 2006.
He has: 52 posts
Joined: Nov 2005
That's the site I've been revising, I should've went through it with more detail.
Thanks Jeeves~
JeevesBond posted this at 01:31 — 27th May 2006.
He has: 3,956 posts
Joined: Jun 2002
No problems! Glad to be of service
Anyway, it's always easy when you know the answer!
Shaun posted this at 07:59 — 27th May 2006.
He has: 52 posts
Joined: Nov 2005
Heh, yeah. That solution seems to work, I don't know why I never learnt CSS earlier :/
I achieve something in CSS in two seconds which I used to do in photoshop taking me almost half an hour. A real life saver if you ask me : )
However, what do you call those 'non tables' you use when using them? That site calls them 'borders' but I keep refering to them as tables >.<
Thanks,
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.