View Full Version : Content and Divs not getting along

11-22-2012, 04:30 AM
Hello everyone here at the forums! My first post comes in the form of a problem.

I've got this website (http://silver-city.cz.cc) that I've been slowly coding, teaching myself along the way. (w3 is an amazing resource)

Now, if you look at that page, you'll see at the bottom, there's a welcome image. It's supposed to be below the slideshow, inside the "welcome" div. If you inspect the source, it shows the img tag is within the divs. But why isn't it?

Here's the CSS.

.fadein {
position: relative;
width: 533px;
height: 300px;
margin-left: auto;
margin-right: auto;
box-shadow: 4px 0 10px #000;
margin-top: 1%;
.fadein img {
position: absolute;
left: 0;
top: 0;
.welcome {
width: 100%;
#highlights {
background: url(gallerybg.png);
width: 70%;
height: 400px;
border: 1px solid #CCC;

So, whaddup with that? I can't figure out why the Welcome.png image refuses to go where it's supposed to. I've tried position:relative/static but it remains where it is. It's very frustrating and strange, and probably also something obvious that as a beginner I don't see.

Thanks in advance for your help.

11-22-2012, 07:27 AM
The welcome image falls under .welcome class...i added to your css:

position: absolute;

moved the image to under the images that are switching. Not sure if this works for you but hope it helps

11-22-2012, 07:35 AM
Hello papkee,
It is in .welcome, which is in #highlights, but your #sidebar is pushing it down. Remove these bits in red and see -
#sidebar {
background: none repeat scroll 0 0 #FFFFFF;
border: 1px solid #CCCCCC;
float: right;
height: 1300px;
margin-left: 70%;
margin-right: 0;
margin-top: 0;
width: 30%;

For a more typical way of building a 2 column layout, have a look at this example (http://nopeople.com/CSS%20tips/simple_2-column/index.html).

11-22-2012, 04:37 PM
Yup, that did it. Thanks a bunch!