"Steen" skrev
> Ja, det kan jeg godt se. Problemet er bare, at jeg ikke kan være sikker
på,
> at der kun er en linjes tekst. Der skal være mulighed for to linjers
tekst,
> som også skal stå i bunden af kassen.
Jeg har spurgt om hjælp til at løse "dit" problem i en engelsk nyhedsgruppe
og har fået nedenstående svar, som du måske kan bruge? Jeg ville ellers have
sendt denne mail direkte til dig, men det er jo ikke muligt.
-----------
> Mind you these two methods are both a bit hack(y). There may be others
but
> I suspect they would be variations on the theme.
>
> Browser allocate defined when drawing for <br> a new block element
> containing the second line text. <div> elements do not have predefined
> margins, but should not be used within header elements.
>
> Using the same principle (allowing for the "descenders" on both lines) but
> establishing the height with a containing div and removing any margin or
> padding from the two h1 elements something like this perhaps
>
> ------------start method 1---------
> div.header {
> background-color: #CCCCCC;
> padding-top:54px;
> font-size:20px;
> }
> .header h1 {
> margin:0;
> padding:0;
> font-size:20px;
> }
>
> and
>
> <div class="header">
> <h1>
> Overskriftj</h1>
> <h1>Second Linej</h1>
> </div>
> -----------End Method1-------
>
> The structural problem is that two headings are created instead of one, if
> this is important.
>
> Another method which maybe a little suspect is to style the <br> but
doesn't
> seem to fall over in modern browsers. So
>
> -------style br--------
>
> .header h1 {
> background-color: #CCCCCC;
> padding-top:54px;
> font-size:20px;
>
> }
>
> br {
> margin:0;
> padding:0;
> }
>
> AND
>
> <div class="header">
> <h1>
> Overskriftj<br>Second Linej</h1>
> </div>
>
> ------ end styling br ---------
--
KH
Tine Müller
homepage:
http://tine_muller.homepage.dk/