Forum Moderators: not2easy

Message Too Old, No Replies

Help with Background image

Help with Background image

         

Rowley

6:23 pm on May 21, 2010 (gmt 0)

10+ Year Member



Hey guys,

This is my first post so bear with me if I don't get the etiquette quite right.

I have just got into web design using CSS recently and am still learning, although I am learning Computer Science at University so can understand more than just the basics. I am having a problem with positioning 2 content carrying divs next to each other side my side without it messing up the background.

Example:
[srowley.webs.com ]

What I am having a problem with is on the homepage of the link above, I can't think what is wrong. The page source is viewable but I can post the code if needed.

There is no real rush on this just a side project from my course and always good to have a personal website i feel.

Thanks in advance

Sam

birdbrain

6:43 pm on May 21, 2010 (gmt 0)



Hi there Rowland,

and a warm welcome to these forums. ;)

I would suggest that you change this...

[blue]
#box{
width: 800px;
margin-left: auto;
margin-right: auto;
text-align: left;
background-color: #464646;
background-repeat: repeat-y;
color: #FFFFFF;
z-index:2;
}

[/blue]

...to this..

[blue]
#box{
width: 800px;
margin: auto;
background-color: #464646;
overflow: hidden;
}

[/blue]


Also note that...
<?xml version="1.0" encoding="UTF-8"?>

...puts IE into "Quirks Mode" and should be removed.

birdbrain

Rowley

6:50 pm on May 21, 2010 (gmt 0)

10+ Year Member



Aw brilliant thank you very much. I'm probably being a bit slow even comparing them, what exactly was wrong with it?

birdbrain

6:58 pm on May 21, 2010 (gmt 0)



Hi there Rowley,

Your problem was resolved with the addition of...
overflow:hidden;

The other changes were just the removal of unnecessary attributes. ;)

birdbrain