Previous Message
Next Message

Padding and divs, basic question

Sent by Scott Haneda on 20 September 2005 23:11

If I have a div that is set to 120px wide, and I want to drop some text into
it, and have that text a few pixels in from the border of the div, is there
some way to do it without messing with the 120px side of things: {
    width: 120px;
    border: 1px solid red;

<div class="foo">

So that's just fine, but the "Something" is butted right up on the red
border, I want it in somewhat, but then it changes the width if I use margin
or padding, and I am betting various browsers deal with this in different
Scott Haneda                                Tel: 415.898.2602
<>                     Novato, CA U.S.A.

css-discuss [EMAIL-REMOVED]]
List wiki/FAQ --
Supported by --
Previous Message
Next Message

Message thread: