HTML Tutorial


 /help/HTML Help Forum   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
I'm trying to add a white box on top of a background
Post new topic   Reply to topic    HTML Help Forum -> HTML Table
View previous topic :: View next topic  
Author Message
cutecreations



Joined: 09 Jun 2009
Posts: 1

PostPosted: Tue Jun 09, 2009 12:27 am     I'm trying to add a white box on top of a background Reply with quote

I'm trying to add a white box on top of a background.

The white box is 664 pixels wide x 768 pixels tall. It has an X value of 180 and Y value of 0.

Here's my code so far:

<style type="text/css">
<!--

body {
background-color: #fff5ba;
background-image: url('Background.png');
no-repeat center scroll;
}

-->
</style></head>
<div style="position:absolute; top:0px; left:150px;">
<img src="images/images/bar_02.gif" width="30" height="768">

<div style="position:absolute; top:0px; left:844px;">
<img src="images/images/bar_02.gif" width="30" height="768">


I am new to Dreamweaver. Does anyone have any code for this?
sticks464



Joined: 31 Dec 2006
Posts: 2625

PostPosted: Tue Jun 09, 2009 4:49 am     Reply with quote

There's a better way to do this without absolute positioning.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Page title here</title>
<style type="text/css">
<!--
* {
margin:0;
padding:0;
}
body {
background:#fff5ba url(Background.png)no-repeat center scroll;
}
#wrapper {
width:724px;
height:768px;
position:relative; /* IE7 & IE6 need this */
margin-left:180px;
}
#left {
float:left;
width:30px;
height:768px;
margin-left:-30px;
position:relative; /* IE6 needs this to show float */
background:#000 url(images/bar_02.gif);
}
#right {
float:right;
width:30px;
height:768px;
background:#000 url(images/bar_02.gif);
}
#content {
margin:0 30px 0 0;
background:#fff;
padding:10px;
height:768px;
}
-->
</style>
</head>

<body>
<div id="wrapper">
<div id="left"></div>
<div id="right"></div>
<div id="content">
Main content goes here
</div>
</div>
</body>
</html>
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum -> HTML Table All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial