HOME
TUTORIAL
∇
Applets
Comments
CSS
Document Tags
Embed
Fonts
Forms
Frames
Images
Lines & Paragraphs
Links
Lists
Logical Tags
Scripts
Sounds
Symbols
Tables
Weird Tags
FORUM
∇
HTML Help
Web Design
Programming Languages
Web Hosting
Domain Names
Marketing
Community
QUICK LIST
CSS
HTML Help Forum
FAQ
Search
Memberlist
Register
Profile
Log in to check your private messages
Log in
Register
- Not registered yet? Got something to say?
Join HTML Code Tutorial
!
I'm trying to add a white box on top of a background
HTML Help Forum
->
HTML Table
View previous topic
::
View next topic
Author
Message
cutecreations
Joined: 09 Jun 2009
Posts: 1
Posted: Tue Jun 09, 2009 12:27 am
I'm trying to add a white box on top of a background
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
Posted: Tue Jun 09, 2009 4:49 am
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:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
HTML Help Forum
->
HTML Table
All times are GMT - 8 Hours
Page
1
of
1
Jump to:
Select a forum
Announcements
----------------
Announcements
HTML Help
----------------
Member Tutorials
General HTML
HTML Form
HTML Table
HTML Frame
CSS
DHTML
SSI
MySpace
HTML Tools
Web Design
----------------
Images & Graphics
Templates
Multimedia
Programming Languages
----------------
Javascript
PHP
Perl
ASP
Others
Web Hosting
----------------
Free Hosting
Shared Hosting
Dedicated, Managed, and Co-located Hosting
Hosting Business and Reseller Hosting
Domain Names
----------------
Registrars
Tools
For Sale, Wanted, & Appraisals
Expired Domains
Monetization
Legal Issues
Marketing
----------------
SEO
PPC
Affiliate Marketing
Other Internet Marketing
Community
----------------
Miscellaneous
Website Review
Introduce Yourself
Feedback
Praise
Errors
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
Your Ad Here
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
DARFUR
Get a
Stop the Genocide
poster at
SaveDarfur.org
.
Also see
Eyes on Darfur
.
HOSTING / DESIGN
$1.99 Domain Registration
Cheap Web Hosting
Website Templates
MAKE MONEY
Sell Domain Names
Sell Website Templates
Home
|
Tutorials
|
Forum
|
Quick List
|
Link Directory
|
About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial