July 13, 200818 yr I have a DIV box that I call a TITLE-STRIP. Its basically used to show a strip of color across the top of a containing DIV, which I then write headings into. My question is this: I use: width: 100%; to make the TITLE-STRIP stretch edge-to-edge inside its containing DIV. I also need to use padding-left: 6px; on the TITLE-STRIP so that the text inside sits away from the left edge of the DIV. The problem arises here, FF3 hangs the TITLE-STRIP DIV 6px over the right edge of its container when I use this code. So I came up with this: width: (100%-6px); Which works beautifully, but, is it bad coding? Or is there a better way to do this that I'm missing? Thanks Jarrad
July 13, 200818 yr Hey Jazzy, It's easier than you might think .. you don't have to specify 100% for width (when width is not specified the div will stretch as long as it can - 100% that is). All you have to do is specify the padding.
July 14, 200818 yr Author Hey Jazzy, It's easier than you might think .. you don't have to specify 100% for width (when width is not specified the div will stretch as long as it can - 100% that is). All you have to do is specify the padding. Hi Mihai, Thanks for your reply. I thought there must be something I was missing problem fixed, no fuss! (interesting how CSS can accept and process equations, I was not aware of this until I tried it) Much appreciated for your help, Jarrad
Create an account or sign in to comment