Εντολη για να εμφανιζεται στο κεντρο του browser?

Ερωτήσεις και απαντήσεις σχετικές με την HTML, XHTML και την κατασκευή σελίδων για το Web.

Συντονιστές: WebDev Moderators, Super-Moderators

Απάντηση
Άβαταρ μέλους
ioannou_b
Δημοσιεύσεις: 42
Εγγραφή: 16 Μάιος 2004 03:58
Επικοινωνία:

Εντολη για να εμφανιζεται στο κεντρο του browser?

Δημοσίευση από ioannou_b » 28 Μάιος 2004 02:28

Ξερει καποιος την εντολη html για να εμφανιζεται το site στο κεντρο του browser?και που μπαινει ακριβως στην γραμη του κωδικα?

Άβαταρ μέλους
agrippas
Script Master
Δημοσιεύσεις: 494
Εγγραφή: 18 Ιούλ 2002 14:52
Τοποθεσία: Υπερπέραν
Επικοινωνία:

Εντολη για να εμφανιζεται στο κεντρο του browser?

Δημοσίευση από agrippas » 28 Μάιος 2004 02:59

Ένας απλός τρόπος είναι αυτός:

Κώδικας: Επιλογή όλων

<html>
<head>
</head>

<body>
<table border=0 height="99%" align=center>
<tr>
<td valign=middle align=center>

<!--  εδώ τα περιεχόμενα της σελίδας  -->

</td>
</tr>
</table>
</body>
</html>

Άβαταρ μέλους
ioannou_b
Δημοσιεύσεις: 42
Εγγραφή: 16 Μάιος 2004 03:58
Επικοινωνία:

Εντολη για να εμφανιζεται στο κεντρο του browser?

Δημοσίευση από ioannou_b » 28 Μάιος 2004 03:19

Μπορεις να μου πεις στο συγκεκριμενο html που μπορω να το βαλω?
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40">


<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel="File-List" href="index_files/filelist.xml">
<title>New Page 2</title>
<!--[if !mso]>
<style>
v\:* { behavior: url(#default#VML) }
o\:* { behavior: url(#default#VML) }
.shape { behavior: url(#default#VML) }
</style>
<![endif]-->
<script language="JavaScript">
<!--
function FP_swapImg() {//v1.0
var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
elm.$src=elm.src; elm.src=args[n+1]; } }
}

function FP_preloadImgs() {//v1.0
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs=new Image; d.FP_imgs.src=a; }
}

function FP_getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
return null;
}
// -->
</script>
</head>
<!--[if gte mso 9]>
<xml><o:shapedefaults v:ext="edit" spidmax="1027"/>
</xml><![endif]-->



<body link="#FF0000" vlink="#0000FF" alink="#FF0000" onload="FP_preloadImgs(/*url*/'button49.jpg',/*url*/'button4A.jpg',/*url*/'button5E.jpg',/*url*/'button5F.jpg',/*url*/'button65.jpg',/*url*/'button66.jpg',/*url*/'button7F.jpg',/*url*/'button80.jpg',/*url*/'button58.jpg',/*url*/'button59.jpg')">

<table cellpadding="0" cellspacing="0" border="1" bordercolor="#FF0000" width="737" height="404">
<!-- MSTableType="layout" -->
<tr>
<td valign="middle" height="402" width="733">
<div style="position: absolute; width: 33px; height: 2px; z-index: 2; left: 22px; top: 64px" id="layer2">
<img border="0" id="img1" src="button48.jpg" height="5" width="30" alt="HOME" fp-style="fp-btn: Simple Text 3; fp-font: 04b_11; fp-font-size: 6; fp-font-color-normal: #FF0000; fp-font-color-hover: #0000FF; fp-font-color-press: #808000; fp-proportional: 0" fp-title="HOME" onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button49.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button48.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'button4A.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button49.jpg')"></div>
<div style="position: absolute; width: 100px; height: 5px; z-index: 3; left: 60px; top: 64px" id="layer3">
<img border="0" id="img2" src="button5D.jpg" height="5" width="146" alt="TDM 900 SPECIFICATIONS" onmouseover="FP_swapImg(1,0,/*id*/'img2',/*url*/'button5E.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img2',/*url*/'button5D.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img2',/*url*/'button5F.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img2',/*url*/'button5E.jpg')" fp-style="fp-btn: Simple Text 3; fp-font: 04b_11; fp-font-size: 6; fp-font-color-normal: #FF0000; fp-font-color-hover: #0000FF; fp-font-color-press: #808000; fp-proportional: 0" fp-title="TDM 900 SPECIFICATIONS"></div>
<div style="position: absolute; width: 72px; height: 5px; z-index: 4; left: 211px; top: 64px" id="layer4">
<img border="0" id="img3" src="button64.jpg" height="5" width="80" alt="MAINTENANCE" fp-style="fp-btn: Simple Text 3; fp-font: 04b_11; fp-font-size: 6; fp-font-color-normal: #FF0000; fp-font-color-hover: #0000FF; fp-font-color-press: #808000; fp-proportional: 0" fp-title="MAINTENANCE" onmouseover="FP_swapImg(1,0,/*id*/'img3',/*url*/'button65.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img3',/*url*/'button64.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img3',/*url*/'button66.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img3',/*url*/'button65.jpg')"></div>
<div style="position: absolute; width: 45px; height: 4px; z-index: 6; left: 296px; top: 64px" id="layer6">
<img border="0" id="img4" src="button7E.jpg" height="5" width="50" alt="FORUM" fp-style="fp-btn: Simple Text 3; fp-font: 04b_11; fp-font-size: 6; fp-font-color-normal: #FF0000; fp-font-color-hover: #0000FF; fp-font-color-press: #808000; fp-proportional: 0" fp-title="FORUM" onmouseover="FP_swapImg(1,0,/*id*/'img4',/*url*/'button7F.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img4',/*url*/'button7E.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img4',/*url*/'button80.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img4',/*url*/'button7F.jpg')"></div>
<p>&nbsp;</p>
<p><!--[if gte vml 1]><v:line id="_x0000_s1040"
style='position:absolute;left:0;text-align:left;top:0;z-index:2' from="219.75pt,47.25pt"
to="219.75pt,51.75pt" coordsize="21600,21600"/><![endif]--><![if !vml]><span
style='mso-ignore:vglayout;position:absolute;z-index:2;left:292px;top:62px;
width:2px;height:8px'><img width=2 height=8 src="index3233_files/image001.gif"
v:shapes="_x0000_s1040"></span><![endif]><!--[if gte vml 1]><v:line id="_x0000_s1039"
style='position:absolute;left:0;text-align:left;top:0;z-index:2' from="42.75pt,47.25pt"
to="42.75pt,51.75pt" coordsize="21600,21600"/><![endif]--><![if !vml]><span
style='mso-ignore:vglayout;position:absolute;z-index:2;left:56px;top:62px;
width:2px;height:8px'><img width=2 height=8 src="index3233_files/image001.gif"
v:shapes="_x0000_s1039"></span><![endif]><!--[if gte vml 1]><v:line id="_x0000_s1038"
style='position:absolute;left:0;text-align:left;top:0;z-index:2' from="156pt,47.25pt"
to="156pt,51.75pt" coordsize="21600,21600"/><![endif]--><![if !vml]><span
style='mso-ignore:vglayout;position:absolute;z-index:2;left:207px;top:62px;
width:2px;height:8px'><img width=2 height=8 src="index3233_files/image001.gif"
v:shapes="_x0000_s1038"></span><![endif]><!--[if gte vml 1]><v:line id="_x0000_s1036"
style='position:absolute;left:0;text-align:left;top:0;z-index:2' from="42.75pt,47.25pt"
to="42.75pt,51.75pt" coordsize="21600,21600"/><![endif]--><![if !vml]><span
style='mso-ignore:vglayout;position:absolute;z-index:2;left:56px;top:62px;
width:2px;height:8px'><img width=2 height=8 src="index3233_files/image001.gif"
v:shapes="_x0000_s1036"></span><![endif]><!--[if gte vml 1]><v:line id="_x0000_s1035"
style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="16.5pt,51.75pt"
to="254.25pt,51.75pt" coordsize="21600,21600" strokecolor="red"/><![endif]--><![if !vml]><span
style='mso-ignore:vglayout;position:absolute;z-index:1;left:21px;top:68px;
width:319px;height:2px'><img width=319 height=2
src="index3233_files/image002.gif" v:shapes="_x0000_s1035"></span><![endif]><!--[if gte vml 1]><v:shapetype
id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe">
<v:stroke joinstyle="miter"/>
<v:path gradientshapeok="t" o:connecttype="rect"/>
</v:shapetype><v:shape id="_x0000_s1033" type="#_x0000_t202" alt="" style='position:absolute;
left:355.5pt;top:211.5pt;width:186pt;height:45pt;z-index:2' filled="f"
stroked="f">
<v:textbox>
<table cellspacing="0" cellpadding="0" width="100%" height="100%">
<tr>
<td align="center">
<h1 class="shape"><span style="font-weight: 400">
<font size="1" face="Verdana">TDM 900 HELLAS last update 28/5/2004.Don't
forget to take a look at the TDM 900 Hellas forum and post your topics.</font></span></h1>
</td>
</tr>
</table>
</v:textbox>
</v:shape><![endif]--><![if !vml]><span style='mso-ignore:vglayout;position:
absolute;z-index:2;left:474px;top:282px;width:252px;height:64px'><img
width=252 height=64 src="index3233_files/image003.gif" v:shapes="_x0000_s1033"></span><![endif]><!--[if gte vml 1]><v:rect
id="_x0000_s1032" alt="" style='position:absolute;left:345pt;top:204.75pt;
width:207pt;height:101.25pt;z-index:1' fillcolor="red" strokecolor="red"/><![endif]--><![if !vml]><span
style='mso-ignore:vglayout;position:absolute;z-index:1;left:459px;top:272px;
width:278px;height:137px'><img width=278 height=137
src="index3233_files/image004.gif" v:shapes="_x0000_s1032"></span><![endif]><!--[if gte vml 1]><v:shape
id="_x0000_s1031" type="#_x0000_t202" alt="" style='position:absolute;left:415.5pt;
top:182.25pt;width:63.75pt;height:18.75pt;z-index:1' stroked="f">
<v:textbox>
<table cellspacing="0" cellpadding="0" width="100%" height="100%">
<tr>
<td align="center"><u><font face="04b_31" size="1" color="#FF0000">NEWS</font></u></td>
</tr>
</table>
</v:textbox>
</v:shape><![endif]--><![if !vml]><span style='mso-ignore:vglayout;position:
absolute;z-index:1;left:554px;top:243px;width:89px;height:29px'><img width=89
height=29 src="index3233_files/image005.gif" v:shapes="_x0000_s1031"></span><![endif]><!--[if gte vml 1]><v:line
id="_x0000_s1030" style='position:absolute;left:0;text-align:left;top:0;
z-index:2' from="345pt,179.25pt" to="552pt,179.25pt" strokecolor="red"
strokeweight="1pt"/><![endif]--><![if !vml]><span style='mso-ignore:vglayout;
position:absolute;z-index:2;left:459px;top:238px;width:278px;height:2px'><img
width=278 height=2 src="index3233_files/image006.gif" v:shapes="_x0000_s1030"></span><![endif]><!--[if gte vml 1]><v:shape
id="_x0000_s1029" type="#_x0000_t202" alt="" style='position:absolute;left:345pt;
top:103.5pt;width:207pt;height:79.5pt;z-index:1' stroked="f">
<v:textbox>
<table cellspacing="0" cellpadding="0" width="100%" height="100%">
<tr>
<td align="center"><font face="Verdana" size="1">The TDM 900 Hellas was
the first Greek personal web page which was occupied with the Yamaha&#8217;s
TDM 900.visitors from the last summer updated page has reached the
6000.I personally want to thank you and promise you that this site will
be continuously updated with news from the Yamaha's TDM 900.</font></td>
</tr>
</table>
</v:textbox>
</v:shape><![endif]--><![if !vml]><span style='mso-ignore:vglayout;position:
absolute;z-index:1;left:460px;top:138px;width:280px;height:110px'><img
width=280 height=110 src="index3233_files/image007.gif" v:shapes="_x0000_s1029"></span><![endif]><!--[if gte vml 1]><v:line
id="_x0000_s1028" style='position:absolute;left:0;text-align:left;top:0;
z-index:2' from="345pt,90pt" to="552pt,90pt" strokecolor="red" strokeweight="1pt"/><![endif]--><![if !vml]><span
style='mso-ignore:vglayout;position:absolute;z-index:2;left:459px;top:119px;
width:278px;height:2px'><img width=278 height=2
src="index3233_files/image006.gif" v:shapes="_x0000_s1028"></span><![endif]><!--[if gte vml 1]><v:shape
id="_x0000_s1027" type="#_x0000_t202" alt="" style='position:absolute;left:345pt;
top:12.75pt;width:207pt;height:81.75pt;z-index:1' stroked="f">
<v:textbox>
<table cellspacing="0" cellpadding="0" width="100%" height="100%">
<tr>
<td align="center"><font face="Verdana" size="1">Welcome to TDM 900
Hellas personal web page.It&#8217;s a web page created for non profit
reasons.Here you can find some info for the Yamaha's TDM 900,maintenance
tips,and extras which can improve your TDM 900 power.Also you can find a
forum where you can post your ideas,questions and answers that they are
related to TDM 900. </font></td>
</tr>
</table>
</v:textbox>
</v:shape><![endif]--><![if !vml]><span style='mso-ignore:vglayout;position:
absolute;z-index:1;left:460px;top:17px;width:280px;height:113px'><img
width=280 height=113 src="index3233_files/image008.gif" v:shapes="_x0000_s1027"></span><![endif]><!--[if gte vml 1]><v:line
id="_x0000_s1026" style='position:absolute;left:0;text-align:left;top:0;
z-index:1' from="338.25pt,19.5pt" to="338.25pt,305.25pt" strokecolor="red"
strokeweight="1pt"/><![endif]--><![if !vml]><span style='mso-ignore:vglayout;
position:absolute;z-index:1;left:450px;top:25px;width:2px;height:383px'><img
width=2 height=383 src="index3233_files/image009.gif" v:shapes="_x0000_s1026"></span><![endif]><!--[if gte vml 1]><v:shape
id="_x0000_s1025" type="#_x0000_t202" alt="" style='position:absolute;left:9.75pt;
top:19.5pt;width:231.75pt;height:23.25pt;z-index:1' stroked="f">
<v:textbox>
<table cellspacing="0" cellpadding="0" width="100%" height="100%">
<tr>
<td align="center">
<p align="left"><u><font face="04b_31" size="1" color="#FF0000">TDM 900
HELLAS WELCOME</font></u></td>
</tr>
</table>
</v:textbox>
</v:shape><![endif]--><![if !vml]><span style='mso-ignore:vglayout;position:
absolute;z-index:1;left:13px;top:26px;width:313px;height:35px'><img width=313
height=35 src="index3233_files/image010.gif" v:shapes="_x0000_s1025"></span><![endif]></p>
<div style="position: absolute; width: 66px; height: 14px; z-index: 7; left: 350px; top: 387px" id="layer7">
<img border="0" id="img6" src="button57.jpg" height="20" width="100" alt="CONTACT ME" onmouseover="FP_swapImg(1,0,/*id*/'img6',/*url*/'button58.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img6',/*url*/'button57.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img6',/*url*/'button59.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img6',/*url*/'button58.jpg')" fp-style="fp-btn: Simple Text 3; fp-font: 04b_11; fp-font-size: 6; fp-font-color-normal: #0000FF; fp-font-color-hover: #FF0000; fp-font-color-press: #808000" fp-title="CONTACT ME"></div>
<div style="position: absolute; width: 100px; height: 100px; z-index: 1; left: 46px; top: 93px" id="layer1">
<img border="0" src="TDM900-gray1.jpg" width="350" height="262"></div>
</td>
</tr>
</table>

</body>

</html>

Άβαταρ μέλους
grjava
Δημοσιεύσεις: 387
Εγγραφή: 13 Μαρ 2002 01:00
Τοποθεσία: athens
Επικοινωνία:

Εντολη για να εμφανιζεται στο κεντρο του browser?

Δημοσίευση από grjava » 28 Μάιος 2004 04:49

Αυτός ο κώδικας δεν έρχεται ποτέ στην μέση διότι δίνεις positions = absolut!!

Άβαταρ μέλους
ioannou_b
Δημοσιεύσεις: 42
Εγγραφή: 16 Μάιος 2004 03:58
Επικοινωνία:

Εντολη για να εμφανιζεται στο κεντρο του browser?

Δημοσίευση από ioannou_b » 28 Μάιος 2004 19:39

Ωραια μπορεις να βοηθησεις?

Άβαταρ μέλους
grjava
Δημοσιεύσεις: 387
Εγγραφή: 13 Μαρ 2002 01:00
Τοποθεσία: athens
Επικοινωνία:

Εντολη για να εμφανιζεται στο κεντρο του browser?

Δημοσίευση από grjava » 29 Μάιος 2004 12:14

Κατάργησε όλες τις εντολές position:
absolute; και μετά κεντράρισε τα tables...

Άβαταρ μέλους
Rapid-eraser
WebDev Moderator
Δημοσιεύσεις: 6851
Εγγραφή: 05 Απρ 2003 17:50
Τοποθεσία: Πειραιάς
Επικοινωνία:

Εντολη για να εμφανιζεται στο κεντρο του browser?

Δημοσίευση από Rapid-eraser » 29 Μάιος 2004 12:27

exo tnv es8isi oti exeis ftiaksei tov kodika sou me windows word ?
Cu, Rapid-eraser, Tα αγαθά copies κτώνται.
Love is like oxygen, You get too much you get too high
Not enough and you're gonna die, Love gets you high


Απάντηση

Επιστροφή στο “HTML και XHTML”

Μέλη σε σύνδεση

Μέλη σε αυτήν τη Δ. Συζήτηση: Δεν υπάρχουν εγγεγραμμένα μέλη και 0 επισκέπτες