3 replies [Last post]
AbbyM
AbbyM's picture
Offline
Regular
New York
Last seen: 11 years 12 weeks ago
New York
Timezone: GMT-4
Joined: 2007-09-30
Posts: 23
Points: 0

Hi there.

I'm having the absolute dumbest problem with CSS. I've been coding for a good while but this is my first attempt at wrapper divs. For some reason, within the wrapper div when I try to have a header and two columns (left, and main, respectively), the columns refuse to go next to each other, like so: http://www.geocities.com/abbym805/. Now, they WILL go next to each other if I make main position:absolute;, but then that kind of defeats the point of the wrapper.

Here's my stylesheet:

body{padding:0px; margin:0px; font-family:arial; font-size:10pt; text-align:center; min-width:700px; background-color:#cccccc;}
#wrapper{width:700px; margin:0 auto; background-color:#ffffff; text-align:left; border-left:2px groove #999999; border-right:2px groove #999999; padding:0px;}
#top{top:0px; width:700px; height:200px; padding:0px; background-image:url(bg.jpg);}
#left{top:200px; left:0px; width:125px; padding:0px;}
#main{top:200px; left:125px; width:575px; padding:0px;}
h1{font-family:bradley hand itc, arial; font-size:48pt; color:#ffffff;}

And then my html:

~buncha javascript for the rollover buttons~
Abby's Site





Prism

Any ideas why this isn't working? Thanks.

Abby
Go away or I will replace you with a very small shell script.

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 2 years 51 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

You're going to want to do

You're going to want to do some research on float

try adding float: left to #left

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

AbbyM
AbbyM's picture
Offline
Regular
New York
Last seen: 11 years 12 weeks ago
New York
Timezone: GMT-4
Joined: 2007-09-30
Posts: 23
Points: 0

you're my hero!

added float:left to #left, and changed left:0px to margin-left:0px on #main, and now it works like a charm. (except that now I need to add some padding and stuff)

http://www.geocities.com/abbym805/

Thanks, Deuce! I'm usually only using float:right on things, when I'm using the whole screen without a wrapper div, but it never occurred to me to use it on the left. Don't know why, lol.

Abby
Go away or I will replace you with a very small shell script.

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 2 years 51 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

(No subject)

:thumbsup:

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph