Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

andyjamesnelson

macrumors 6502
Original poster
Aug 24, 2003
286
0
Jacob's house
Hey I was wondering if anyone can help me with an issue i am having with height and width.

http://andyjamesnelson.co.uk/beatabet/

If you can take a look at the this page and then the source / the css is embedded for the mo.

For some reason I am getting horizontal and vertical scroll bars that seem to long?

Why is this? What am I missing out or doing wrong with my code?

Thanks, Andy
 
The horizontal part of it is due to a negative right value.
Code:
#contact p {
...
	position:relative; [B]right:-350px[/B]; top:110px;
}
The vertical part is due to setting the height so long and a top setting.
Code:
#rightcol {
...
	position:relative;[B] top:-726px[/B];
}
You'll need to work out better ways to layout the page than what you have so you don't get those extra scroll regions.
 
ok but why? I really dont get why at all...

:(

andy

To quickly see what's up, put
Code:
outline: 1px solid #f00; /*( very handy for debugging )*/
on a few of your elements to see how far they are reaching. It's essentially a result of the box model being misused. When using properties like 'top' and 'right' it doesn't do quite what you think it's doing. I suggest reading up on the box model if you want a more detailed understanding.
 
ok cool i will try that - thanks for the tips.

For some reason when I read about css I feel like I understand it and then when it comes to the actual implementation of layout I'm like what the hell...

More practice I guess.

Andy
 
ok thanks I sorted the problem - the outline trick is really useful for seeing how my contact paragraph had inherited width. and the height problem was due to my use of the relative position leaving an empty space at the bottom of the screen.

thanks, again. andy
 
ok thanks I sorted the problem - the outline trick is really useful for seeing how my contact paragraph had inherited width. and the height problem was due to my use of the relative position leaving an empty space at the bottom of the screen.

thanks, again. andy

Glad you figured it out. Outlining really is useful for layout issues. CSS is very simple on first appearance, and is actually easy to implement for the basic stuff. It's not until you start constructed more fanciful layouts that the "art" of CSS becomes more apparent.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.