Avatar billede klas Juniormester
14. april 2001 - 13:07 Der er 16 kommentarer og
2 løsninger

centrering af side

Hvorfor kan jeg ikke få www.cosmicweb.dk til at være centreret ( verticalt eller hvad man nu kalder det . .)

Jeg er blevet nødt til at sætte nogle <br> ind istedet for . .burde det ikke bare være valign=\"middle\" ??
Avatar billede netsrac Praktikant
14. april 2001 - 13:11 #1
<TABLE BORDER=\"0\">
<TR>
<TD VALIGN=\"center\">

<!--DIT GAMLE INDHOLD HER-->


</TD>
</TR>
</TABLE>
Avatar billede tommyf Nybegynder
14. april 2001 - 13:12 #2
<td valign=\"middle\"> ?
Avatar billede tommyf Nybegynder
14. april 2001 - 13:12 #3
Sådan her:
<td valign=\"middle\" align=\"center\">

Netsrac<--> Kan du så holde dig til ASP-kategorien...
Avatar billede netsrac Praktikant
14. april 2001 - 13:14 #4
tommyf >> Niks, det hedder da ikke valign=\"middle\", men valign=\"center\"
Avatar billede tommyf Nybegynder
14. april 2001 - 13:21 #5
http://developer.netscape.com/docs/manuals/htmlguid/index.htm

TD
(table data)
The TD tag specifies text in a cell in a table. Use the TD tag inside a TR tag inside a TABLE tag. Navigator 1.1.
You can set the background color of a cell by specifying its BGCOLOR attribute. For each cell, you can use the COLSPAN and ROWSPAN attributes to specify how many columns and rows the cell spans.

To specify the distance between cells, set the CELLSPACING attribute in the TABLE tag. To specify the distance between the borders of each cell and its contents, set the CELLPADDING attribute in the TABLE tag. All cells in a table have the same padding and spacing.

If a cell is empty, that is, the <TD> tag is immediately followed by the </TD> tag, the space occupied by the cell in the table is completely empty. That is, the cell has no content, no background color, and no border.

However, suppose you have a four column table, but you have no data for the second column in one of the rows. You should still provide the second TD tag for that row, because if you leave it out the table will close the gap and move the third cell into the second column. The row will end up having three columns only, and it will not be aligned with the rest of the table.

If you want an empty cell to look like other cells in the table, you can give it a period or a dash to indicate that the data is unknown, for example, <TD>-</TD>.


Syntax
<TD
  ALIGN=\"CENTER|LEFT|RIGHT\"
  VALIGN=\"BASELINE|BOTTOM|MIDDLE|TOP\"
  BGCOLOR=\"color\"
  COLSPAN=\"value\"
  ROWSPAN=\"value\"
  HEIGHT=\"pixelHeight\"
  WIDTH=\"pixelWidth\"
  NOWRAP=\"value\"
>
...
</TD>
Avatar billede tommyf Nybegynder
14. april 2001 - 13:21 #6
Så jeg holder på \"middle\"
Avatar billede netsrac Praktikant
14. april 2001 - 13:24 #7
Ja det står der jo godt nok, jeg har altid brugt center og var overbevist om at det var rigtigt, men det er det jo så åbenbart ikke, men det virker. Iøvrigt en lille rettelse:

<TABLE BORDER=\"0\" HEIGHT=\"100%\">
<TR>
<TD VALIGN=\"center\">

<!--DIT GAMLE INDHOLD HER-->

</TD>
</TR>
</TABLE>
Avatar billede klas Juniormester
14. april 2001 - 13:31 #8
heh .. tjek www.cosmicweb.dk

Det er det jeg ikke forstår .. jeg havde også prøvet det før . .men det virker ikke ?

Jeg må lave en eller anden dum fejl . .men hvad?
Avatar billede netsrac Praktikant
14. april 2001 - 13:33 #9
Du mangler den HEIGHT=\"100%\"
Avatar billede klas Juniormester
14. april 2001 - 13:33 #10
min kode ser nu således ud:

<TABLE BORDER=\"0\" HEIGHT=\"100%>
<TR>
<td valign=\"middle\" align=\"center\">



</TD>
</TR>
</TABLE>
Avatar billede klas Juniormester
14. april 2001 - 13:34 #11
hov . .der mangler et \"
Avatar billede tommyf Nybegynder
14. april 2001 - 13:35 #12
<TABLE BORDER=\"0\" HEIGHT=\"100%>
Du har glemt \" til sidste :o)
... ved ikke om det er det.
Avatar billede netsrac Praktikant
14. april 2001 - 13:35 #13
Nu er den da også centreret.
Avatar billede tommyf Nybegynder
14. april 2001 - 13:35 #14
... nå, den opdagede du selv :o)
Avatar billede klas Juniormester
14. april 2001 - 13:35 #15
Walla!

<TABLE BORDER=\"0\" align=\"center\" HEIGHT=\"100%\">
<TR>
<td valign=\"middle\" align=\"center\">


Så virker det . . hvis ikke der er align=center i table så virker den heller ikke?
Avatar billede netsrac Praktikant
14. april 2001 - 13:37 #16
:-)
Avatar billede netsrac Praktikant
14. april 2001 - 13:38 #17
Jo så skal du du bare sætte den til at være WIDTH=\"100%\" ogå mener jeg.
Avatar billede klas Juniormester
14. april 2001 - 13:43 #18
ikke nødvendigt . . den kører fint nu  :)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester