PDA

View Full Version : using float left and trying bottom too


Greg
01-27-2003, 10:19 AM
body {
margin:0px;
padding:0px;
color: #000;
background-color:#009999;
}

.men{
float: left;
padding: 20px;
margin: 5px;
background-color: #A6E1C3;
border:1px solid #000;
width: 20%;
}
.scr{
position: static;
bottom:;
padding: 20px;
margin: 5px;
background-color: #99CC99;
border:1px solid #000;
}
I am using <div class="men"></div>
I have about 4 of these going across the page
now I would like to have
a box on the bottom of the page all the way across
can I do that if so what would I change or add in .scr????
as it is now .scr is behide .men

ByteWizard
01-27-2003, 12:01 PM
Change position to absolute.

Give a top: xx;
left: xx;
for the absolute postion. (distance from the top and distance from the left)

You need to add something like
width: 98%
to scr.

I am working on a site here (http://jpharper.home.mindspring.com/) that may give you some ideas.

Greg
01-30-2003, 11:01 AM
ByteW,

Thanks but at first I thought your way was't working,
until I starting making the view in the browser smaller(widthwise),
(IE)......
So I went and looked at it in Opera, which works fine without
making the view smaller...............
So is there a another way so (IE) will see it as Opera?

Second question, can I make the .men so that it will adjust
to how many of them I need to use and can they be center
on the page depending on how many are used?

meaning if I used two for one page the two are center but
if three are used for another then the three are center?

DCElliott
01-30-2003, 12:19 PM
You can wrap all the .men in a div and then center that div.

DE

Greg
01-30-2003, 01:45 PM
DC,

Do you mean something like

<div><center>

<div class .men=1></div>
<div class .men=2></div>
<div class .men=3></div>
</center>
</div>

DCElliott
01-31-2003, 07:15 PM
Yes - do you want .men to be centered within the div, or the container div to be centered, or both?

DE

Greg
02-01-2003, 12:14 PM
DC,
I am not sure how to answer your question, but I am going
to repost my tags because of trying changes.

CSS page called men.css
body {
margin:0px;
padding:0px;
color: #000;
background-color:#009999;
}

.men{
float: left;
padding: 15px;
margin: 3px;
background-color: #A6E1C3;
border:1px solid #000;
width: 20%;
}
.law{
top: 1000px;
left: 5px;
padding: 20px;
margin: 5px;
background-color: #009999;
border:0px solid #000;
width: 98%
}
html page

<html>
<head>
<title>TROOP 230 INFO</title>
<meta name="Description" content="Information on troop 230 chesterfield Indiana">
<meta name="Keywords" content="Law,Oath,Motto,Slogan,Outdoor,Camping,Cooking,FirstAid">

</head>
<body>
<link rel="stylesheet" href="men.css" type = "text/css">

<p align="center"><font face="arial" size="6"><b>Troop 230</b></font>

<p align="center"><font face="arial" size="6"><b>TROOP INFO</b></font>


<div><center>
<div class = "men">TROOP
<hr>
<p><a href="scoutchoice.html">SCOUTS</a></p>
<p><a href="schedchoice.html">SCHEDULE</a></p>
</div>
<div class = "men">EAGLES
<hr>
<p><a href="eagleout.asp">EAGLES</a></p>
</div>
<div class = "men">SUMMER CAMP
<hr>
<p><a href="camp.html">SUMMER CAMPS</a></p>
<p><a href="scinf.html">SUMMER CAMP INFO</a></p>
<p><a href="myfire.html">PAUL'S SONG</a></p>
</div>
</center></div>
<br>
<div class = "law">
<font size="6" color="black">
<hr>

<SCRIPT LANGUAGE="javascript" SRC="law.js" type="text/javascript"></SCRIPT>
<hr>

</font>
</div>


<br>



<br>

<%
vip=Request.ServerVariables("REMOTE_ADDR")
vrefer=Request.ServerVariables("HTTP_REFERER") & Request.ServerVariables("URL")
vtime=time
vdate=date
vhost=Request.ServerVariables("REMOTE_HOST")

Set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open = "DRIVER={Microsoft Access Driver (*.mdb)};"&"DBQ=" & Server.MapPath("\troop230\db\track.mdb") & ";"
SQLString = "INSERT INTO t(ipnum, refer, currtime, currdate, remhost) VALUES('" & vip & "' , '" & vrefer & "' , #" & vtime & "# , #" & vdate & "# , '" & vhost & "')"
MyConn.Execute(SQLString)

MyConn.Close
Set MyConn = Nothing
%>

</body>
</html>


Now will come back and post where you can hit page and
then try and explain how I would like that page to
be shown.

Greg
02-01-2003, 12:20 PM
The page I am working with is here:

http://www16.brinkster.com/troop230/info2.asp

For those of you that have IE,

if you have your tab favorites or history press
chances are the page will look like I want
div law to work its at the bottom of the page,
the only other thing I want to happen is that all
of div men to be center in the middle of the page.



if you turn off favorites and history the div law moves
up with the div men....not what I want.

does this let you know what I want DC?

and where is Bindle when you need him? :D

DCElliott
02-01-2003, 12:31 PM
You may want to use <br clear="all" /> after the men to put the a scout is . . . section underneath, if that was your intention.

I'll look at your code a bit further later.

DE
ex-leader of the fearsome Wolverine patrol! :p

Greg
02-01-2003, 08:34 PM
DC,
Yahoo!:D

<br clear="all">
It worked!!!!!!!
Now all I want is to have the men center.


I'm part of the coffee patrol ;)
Troop took first in campsite this weekend!