Just nu i M3-nätverket
Jump to content

Att få snygg layout.


Skåningen

Recommended Posts

Jag kör Css stilmalar via

 

<div classs="Classen">

<table border="0">

<tr>

</tre>

<td>

kod och information.

</td>

</table>

</div>

 

Men jag får ändå inte det på rätt plats.

Bifogar en fil (bild) som du kan se hur problemet uppdagar sig.

 

jag vill att min lilla textarea ska vara länst till höger med skickas knappen.

Men jag får det inte på höger sida hur jag än gör.

Någon som kan förklara det här fenomenet?

 

har provat med

position.absolute;

och

position:relatiive;

 

Men inget hjälper.

 

 

 

[bild bifogad 2005-07-30 14:25:43 av Skåningen]

734314_thumb.jpg

Link to comment
Share on other sites

Jag tror att du kan få mer hjälp om du postar den riktiga koden eller en länk till sidan.

 

Sen tycker jag det ser ut som textarean är till höger. Skicka knappen däremot är till vänster.

 

Link to comment
Share on other sites

CSS filen ser ut följande:

 

/* CSS Document */

.Rubrik
{
position:relative;
top:8px;
left: 3px;
right: 3px;
color: #000000;
text-align: center;
}
.Velcome
{
position:relative;
top: 91px;
left: 10px;
width: 550px;
height: auto;
font-size: 12px;
font-family: Verdana, Arial, Helvetica, sans-serif;
cursor: help;
}

.inlogning
{
position:absolute;
top:171px;
right:5px;
width: 200px;
height:auto;
}
.Information
{
position:relative;
top:250px;
left:10px;
font-family: Georgia, Verdana, Arial, Helvetica, sans-serif;
height: 100px;
width: 600px;
}
.Viktiginformation
{
  position:relative;
   top: 450px; 
  left:10px;
  height: 100px;
  width: 600px;
}

.SenasteNytt
{
  position:relative;
  top:650px;
  left:10px;
  height: 100px;
  width: 600px;
}
.Driftstopp
{
  position:relative;
  top: 850px; 
  left: 10px;
  height: 100px;
  width: 600px;
}
.link
{
position:absolute;
top:125px;
left: 10px;
width: 100px;
height: 50px;
}
.Reklam
{
position:absolute;
top:   291px;
right: 100px;
width: 100px;
height: 10px;
}
.Aboutes
{
position:absolute;
top: 300px;
left: 10px;
with: 600px;
}
.hule
{
position:relative;
top: 150px;
left: 10px;
width: 400px;
height: auto;
}
.Guestbook
{
position: relative;
top: 50px;
left: 10px;
font-family: Georgia;
float:left;
}
.GAnser
{
position: absolute;
left:    0px;
right: 900px;
Width:  30px;
}
.Artiklar
{
position:absolute;
top: 50px;
left: 10px;
right: 10px;
bottom: 50px;
}
.Artikel
{
position:relative;
top: 10px;
left:20px;
right:20px;
bottom: 60px;
}

 

ASP filen ser ut på följande:

 

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%
if session("AnvändarId") ="" then
%>
<script language="javascript">
{
parent.self.location.href='../../../'
}
</script>
<%
else
end if

set con = server.CreateObject("Adodb.connection")
con.open "Driver={Microsoft Access Driver (*.mdb)};dbq=" & server.MapPath("databasen.mdb") & ";"
set rst = con.execute("select * from UserAcounts where id=" & cLng(request.QueryString("AnvId")))
if not rst.eof then

%> 
<title>Välkommen till <%response.write rst("Anv")%>. Gästbok.</title>
<%
else
Response.write "<title>GÄSTBOK</title>"
end if
con.close
set con = Nothing
set rst = Nothing
%>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="../../../css/1024-768.CSS" type="text/css">
<script language="javascript">
var uri = 'http://impse.tradedoubler.com/imp/img/1067/1088301?' + new String (Math.random()).substring (2, 11);
document.write('<a href="http://clk.tradedoubler.com/click?p=19&a=1088301&g=1067" target="_blank"><img src="'+uri+'" border=0></a>');
</script>
<script language="javascript">
var uri = 'http://impse.tradedoubler.com/imp/img/28345/1088301?' + new String (Math.random()).substring (2, 11);
document.write('<a href="http://clk.tradedoubler.com/click?p=4566&a=1088301&g=28345" target="_blank"><img src="'+uri+'" border=0></a>');
</script>
</head>
<body>
<!-- OnFocus="parent.location.reload();" -->

<iframe name="Meny" src="../menu.asp?Menu=1&AnvId=<%=Request.QueryString("AnvId")%>" framespacing="0" frameborder="0" border="0" height="50" width="100%">
</iframe>
<%
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "Driver={Microsoft Access Driver (*.mdb)};Dbq=" & Server.MapPath("/../../../../../db/pluget-nu.mdb") & ";Uid=Admin;Pwd=lösenord"

Set RecSet = Server.CreateObject("ADODB.Recordset")
SQL = "Select * FROM Guestbook  where Tuser=" & cLng(request.querystring("AnvId")) & " ORDER BY datum DESC"
RecSet.Open SQL,Connect,1,2%>
<%
if not RecSet.eof then
Dim sida
sida =Trim(Request.QueryString("sida"))
If sida = "" Then
sida = 1
End If
RecSet.PageSize = 10
RecSet.AbsolutePage = sida
%>
<%
Dim rad
rad = 0
While Not RecSet.EOF and rad < RecSet.PageSize
rad = rad + 1%>
<!--Här skrivs allting ur databasen ut. -->
<div class="Guestbook">
<table border="0" width="400">
<tr>
</tr>
<tr>
<%
response.write "<td>" & recset("Datum") &"&nbsp;" & recset("Tid") & "</Td></tr><tr>"
set rst = connect.execute("select * from UserAcounts where id=" & RecSet("Fuser"))
if not rst.eof then
response.write "<td width=""50""><a href=../press/press.asp?AnvId=" & RecSet("Fuser") & ">" & Rst("Anv") & "</a></td>"
else
response.write "Kunde ej vissa användaren!"
end if
set rst = Nothing
response.write "</tr><tr>"
response.write "<td width=""600"">" & RecSet("Messages") & "</td>"
'response.write "</tr><tr></tr>"

'om man ska kunna skriva eller radera sina inlägg.
if not cLng(session("AnvändarId")) = cLng(request.QueryString("AnvId")) Then
response.write "Du kan bara skriva och radea dina skriva gästboks inlägg,"
%>
<div class="GAnser">
<form method="post" action="guestbooks.asp?AnvId=<%=Request.querystring("AnvId")%>">
<td>
<textarea cols="15" rows="5"  name="GBok">
</textarea>
</td>
<tr>
<td>
<input type="submit" value="Skicka">
</td>
</tr>
</form>
</div>
<%
else
response.write "<td> Du kan svara/och radera dina gästboks inlägg.</td></tr><tr>"
%>
<script language="javascript">
function Anser()
{
window.open('besvara.asp?AnserId=<%=RecSet("Fuser") & "&AnvId=" & request.QueryString("AnvId")%>',"Besvara","toolbar=no,menu=no,width=190,height=200,");
}
</script>
<%
response.write "<td><a href=javascript:Anser();>Svara</a>"
response.write "<td width=""300""><a href=radera_guestbook.asp?AnvId=" & request.querystring("AnvId") & "&DeletId=" & RecSet("Idd") & ">Radera inlägg</a><td></tr><tr>"
end if

RecSet.MoveNext
Wend
%>
<%
response.write "</tr><tr>"
If RecSet.PageCount > 1 Then
For i = 1 to RecSet.PageCount
If i = CLng(sida) Then
Response.Write "<td>[" & i & "]&nbsp;</td>"
Else
Response.Write "<td><a href=guestbok.asp?AnvId=" & Request.QueryString("AnvId") & "&Sida=" & i & ">" & i & "</a>&nbsp;</td>"
End If
if i < Clng(sida) and i>1 then
response.write "<td><a href=guestbok.asp?AnvId=" & Request.QueryString("AnvId") & "&Sida=" & (i-1) & ">" & "Föregående" & "</a>&nbsp;</td>"
end if
Next
End If
RecSet.Close : Set RecSet = Nothing
Connect.Close : Set Connect = Nothing
%>
<%
else
'response.end
set con = server.CreateObject("adodb.connection")
con.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & server.MapPath("/../../../../../db/pluget-nu.mdb") & ";"
set rst = con.execute("select * from UserAcounts inner join Guestbook On UserAcounts.id = Guestbook.Tuser where id=" & cLng(request.QueryString("AnvId")))
'If not rst.eof then
'do until rst.eof
'response.write rst("Datum") & "<br>"
'response.write rst("Messages") & "<br>"
'rst.movenext
'loop
'con.close
'set con = Nothing
'set rst = Nothing
'else
response.write "Du har visst inte fått något gästboks inlägg än, men snart har du ett gästboks inlägg *vinkar* :-))"
Meddelande = "Hjärtligt välkommen till communityt. Jag hoppas att communityt kommer att ge många fina och roliga stunder här /MVH Admin."
set con = server.CreateObject("adodb.connection")
con.open "driver={microsoft access driver (*.mdb)};dbq=" & server.MapPath("/../../../../../db/pluget-nu.mdb") & ";"
set rst = con.execute("Insert Into Guestbook(Fuser,Tuser,messages,datum,tid)values('" & 1 & "','" & cLng(session("AnvändarId")) & "','" & Meddelande & "','" & #2005-04-24# & "','" & #23:55:00# & "')")
end if
%>
</table>
</div>
</body>
</html>

 

Här är fullständig kod för css och även i asp filen där jag använder css koden.

 

Link to comment
Share on other sites

[log]

CSS filen ser ut följande:

 

/* CSS Document */

.Rubrik
{
position:relative;
top:8px;
left: 3px;
right: 3px;
color: #000000;
text-align: center;
}
.Velcome
{
position:relative;
top: 91px;
left: 10px;
width: 550px;
height: auto;
font-size: 12px;
font-family: Verdana, Arial, Helvetica, sans-serif;
cursor: help;
}

.inlogning
{
position:absolute;
top:171px;
right:5px;
width: 200px;
height:auto;
}
.Information
{
position:relative;
top:250px;
left:10px;
font-family: Georgia, Verdana, Arial, Helvetica, sans-serif;
height: 100px;
width: 600px;
}
.Viktiginformation
{
  position:relative;
   top: 450px; 
  left:10px;
  height: 100px;
  width: 600px;
}

.SenasteNytt
{
  position:relative;
  top:650px;
  left:10px;
  height: 100px;
  width: 600px;
}
.Driftstopp
{
  position:relative;
  top: 850px; 
  left: 10px;
  height: 100px;
  width: 600px;
}
.link
{
position:absolute;
top:125px;
left: 10px;
width: 100px;
height: 50px;
}
.Reklam
{
position:absolute;
top:   291px;
right: 100px;
width: 100px;
height: 10px;
}
.Aboutes
{
position:absolute;
top: 300px;
left: 10px;
with: 600px;
}
.hule
{
position:relative;
top: 150px;
left: 10px;
width: 400px;
height: auto;
}
.Guestbook
{
position: relative;
top: 50px;
left: 10px;
font-family: Georgia;
float:left;
}
.GAnser
{
position: absolute;
left:    0px;
right: 900px;
Width:  30px;
}
.Artiklar
{
position:absolute;
top: 50px;
left: 10px;
right: 10px;
bottom: 50px;
}
.Artikel
{
position:relative;
top: 10px;
left:20px;
right:20px;
bottom: 60px;
}

 

ASP filen ser ut på följande:

 

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%
if session("AnvändarId") ="" then
%>
<script language="javascript">
{
parent.self.location.href='../../../'
}
</script>
<%
else
end if

set con = server.CreateObject("Adodb.connection")
con.open "Driver={Microsoft Access Driver (*.mdb)};dbq=" &amp; server.MapPath("databasen.mdb") &amp; ";"
set rst = con.execute("select * from UserAcounts where id=" &amp; cLng(request.QueryString("AnvId")))
if not rst.eof then

%> 
<title>Välkommen till <%response.write rst("Anv")%>. Gästbok.</title>
<%
else
Response.write "<title>GÄSTBOK</title>"
end if
con.close
set con = Nothing
set rst = Nothing
%>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="../../../css/1024-768.CSS" type="text/css">
<script language="javascript">
var uri = 'http://impse.tradedoubler.com/imp/img/1067/1088301?' + new String (Math.random()).substring (2, 11);
document.write('<a href="http://clk.tradedoubler.com/click?p=19&a=1088301&g=1067" target="_blank"><img src="'+uri+'" border=0></a>');
</script>
<script language="javascript">
var uri = 'http://impse.tradedoubler.com/imp/img/28345/1088301?' + new String (Math.random()).substring (2, 11);
document.write('<a href="http://clk.tradedoubler.com/click?p=4566&a=1088301&g=28345" target="_blank"><img src="'+uri+'" border=0></a>');
</script>
</head>
<body>
<!-- OnFocus="parent.location.reload();" -->

<iframe name="Meny" src="../menu.asp?Menu=1&AnvId=<%=Request.QueryString("AnvId")%>" framespacing="0" frameborder="0" border="0" height="50" width="100%">
</iframe>
<%
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "Driver={Microsoft Access Driver (*.mdb)};Dbq=" &amp; Server.MapPath("/../../../../../db/pluget-nu.mdb") &amp; ";Uid=Admin;Pwd=lösenord"

Set RecSet = Server.CreateObject("ADODB.Recordset")
SQL = "Select * FROM Guestbook  where Tuser=" &amp; cLng(request.querystring("AnvId")) &amp; " ORDER BY datum DESC"
RecSet.Open SQL,Connect,1,2%>
<%
if not RecSet.eof then
Dim sida
sida =Trim(Request.QueryString("sida"))
If sida = "" Then
sida = 1
End If
RecSet.PageSize = 10
RecSet.AbsolutePage = sida
%>
<%
Dim rad
rad = 0
While Not RecSet.EOF and rad < RecSet.PageSize
rad = rad + 1%>
<!--Här skrivs allting ur databasen ut. -->
<div class="Guestbook">
<table border="0" width="400">
<tr>
</tr>
<tr>
<%
response.write "<td>" &amp; recset("Datum") &amp;"&amp;nbsp;" &amp; recset("Tid") &amp; "</Td></tr><tr>"
set rst = connect.execute("select * from UserAcounts where id=" &amp; RecSet("Fuser"))
if not rst.eof then
response.write "<td width=""50""><a href=../press/press.asp?AnvId=" &amp; RecSet("Fuser") &amp; ">" &amp; Rst("Anv") &amp; "</a></td>"
else
response.write "Kunde ej vissa användaren!"
end if
set rst = Nothing
response.write "</tr><tr>"
response.write "<td width=""600"">" &amp; RecSet("Messages") &amp; "</td>"
'response.write "</tr><tr></tr>"

'om man ska kunna skriva eller radera sina inlägg.
if not cLng(session("AnvändarId")) = cLng(request.QueryString("AnvId")) Then
response.write "Du kan bara skriva och radea dina skriva gästboks inlägg,"
%>
<div class="GAnser">
<form method="post" action="guestbooks.asp?AnvId=<%=Request.querystring("AnvId")%>">
<td>
<textarea cols="15" rows="5"  name="GBok">

[/log]

 

Skrev det som nytt då jag intek an uppdatera mitt inlägg, i IE eller FF

FF = FireFox

och

IE = Internet Explorer.

Här även nu script error.

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...