Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Border Help

Status
Not open for further replies.

bam720

Technical User
Sep 29, 2005
289
US
I am creating a page that I want to have a border around the entire contents.
Code:
+--------------------------+
|           *************  |
| +--+  +----------------+ |
| |  |  |                | |
| |  |  |                | |
| |  |  |                | |
| |  |  |                | |
| |  |  |                | |
| +--+  +----------------+ |
|  ************            |
+--------------------------+
I am stuck on the outer border. Whenever I try to float any of the inner elements the border collapses on itself.

Code:
/* top stars in pic*/
#top{width:80%;;margin-right:20px;float:right}

#left{width:20%;height:auto;margin-left:20px;float:left}

/* Large Area in pic */
/* generated from DB */
#mainImg {width:75%;height:auto;float:right;text-align:center;color:#FFFFFF;font-size:11px;font-family:Arial, Helvetica, sans-serif;}

/*bottom stars in pic */
#bottom{width:100% margin:0 20px; float:left;clear:both;}

Thanks for the help. (the page is not on the a public server other wise I'd share that. If you need full HTML CSS I can provide most of it)
 
sorry just realized I forgot more relavant code:

Code:
#border {
	width:720px;height:auto;
	border:1px solid #4F4F4F;
	margin-top:40px;
	margin-left:auto;
	margin-right:auto;
	text-align:left;
	clear:both;
}

======================

html page...

<div id="border">
  <div id="#top"></div>
  <div id="#left"></div>
  <div id="#mainImg"></div>
  <div id="#bottom"></div>
</div>
 
I un-floated the bottom id and its all good now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top