1 reply [Last post]
Last seen: 16 years 16 weeks ago
Joined: 2006-02-01
Posts: 1
Points: 0

I am starting to make the switch...yes, tables to css...but check this out...http//www.halowebdesign.com/samurai/ . How do I align the sword thats underneath the text box (grey area) to the right? Heres my css code...

margin-top 0px;
background-image url(banner.jpg);
background-position top center;
background-repeat no-repeat;

height 100%;
padding 0px 0px 0px 0px;
margin 0px;


#content {
padding 149px 0px 0px 0px;
margin 0px;
z-index 1;

position relative;
padding 0px 0px 100px 0px;
margin 0px;
z-index -1;

and my html...

<html xmlns="http//www.w3.org/1999/xhtml">
<link rel="stylesheet" href="style.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Halo Web Design</title>
<div id="body">
<div id="content">
<img src="content_bkgnd.jpg" width="502" height="602" />
<div id="right">
<img src="right_side2.jpg" width="78" height="854" />


Tyssen's picture
Last seen: 7 years 32 weeks ago
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Positioning Images

You'd need to float it right but the float needs to come before the non-floated content in the source. Also, I wouldn't attach your banner graphic to the body like that. You'd be better creating a header element in your HTML and attaching it to that.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference