[thelist] css percentages
Anthony Johnston - Antix
tech at antix.co.uk
Tue Feb 25 05:26:01 CST 2003
wasn't real code, but ta anyway, what I'm trying to get
at is; using percentages on floated items will never give
you a flush to the screen effect - when you add a border.
which if is so - is weird, (please say it isn't so).
nother e.g.
<span style='float: left; width: 50%; border: solid 10px;'>
lalala
</span>
<span style='float: left; width: 50%; border: solid 10px;'>
lalala
</span>
Ant.
>-----Original Message-----
>From: thelist-admin at lists.evolt.org
>[mailto:thelist-admin at lists.evolt.org]On Behalf Of Kae Verens
>Sent: 25 February 2003 11:02
>To: thelist at lists.evolt.org
>Subject: Re: [thelist] css percentages
>
>
>Anthony Johnston - Antix wrote:
>> With the standards on boxes as they are I cannot get a flush
>> 100% width bordered div - is this right?
>>
>> <div style='width: 100%;' border: solid 10px;>lalala</div>
>> will make the screen scroll.
>>
>> is there a work around... about? TA, Ant.
>
>I think the problem here is the border - first off, you've set it
>outside the style definition, which is incorrect, but also when you
>specify a width, the border is added to that width - so a box with width
>100% and borders 2px is actually 100%+4px in size (not counting margins).
>
>By default, <div> is display:block, which is 100% width - you don't need
>to specify it as 100% width.
>
>Try removing the padding and margin from <body>, which may help with
>what you want.
>
>btw: even if the border had been in the <div>, it wouldn't have worked
>as you didn't define a colour. By default, the colour of the border is
>transparent.
>
>--
>Kae Verens
More information about the thelist
mailing list