Forum Moderators: not2easy

Message Too Old, No Replies

horizontal scrollbar problem

         

wceend

12:59 pm on Jun 25, 2003 (gmt 0)

10+ Year Member



Hi,

I have a CSS problem:

I defined a div with an ID named "content". I would like to have some margins on the left and the right site of the browser. My class for this div:

div#content{
margin-left: 10px;
margin-right; 10px;
}

Now I defined a table in this div with the following id:

table#results{
width=100%
}

When I look in IE I see a horizontal scrollbar, does anybody knows what I'm doing wrong?

Thanks

Jonathan van den Bosch

grahamstewart

1:04 pm on Jun 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



margin-right; 10px;

You have a ; instead of a :

width=100%

You have a = instead of a :

I recommend trying the W3C CSS Validator [jigsaw.w3.org]

wceend

1:24 pm on Jun 25, 2003 (gmt 0)

10+ Year Member



oops your right...

table#results{
width : 100%
}

the problem with the horizontal scrollbar still excists

Jonathan

stever

1:32 pm on Jun 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you have:

body{
padding: 0px;
margin: 0px;
}

specified?

BlobFisk

1:51 pm on Jun 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You may also need to specify 100% widths on the parent elements also.

wceend

1:56 pm on Jun 25, 2003 (gmt 0)

10+ Year Member



thank you!

No scrollbar anymore!

new CSS:

body{
padding: 0px;
margin: 0px;
}

div#content{
margin-left: 10px;
margin-right; 10px;
width:100%
}

table#results{
width:100%
}