1 reply [Last post]
BladeMetal
Offline
newbie
Last seen: 13 years 44 weeks ago
Joined: 2006-01-17
Posts: 5
Points: 0

Hi,
I've just started using CSS but I have a problem.
My site is designed for 800 x 600 resolution and my problem lies here:

#mstitlebar h5 {
	clear: both;
	background-color: #888888;
	margin: 17px 66% 0px 1px;
	color: #FFFFFF;
	padding-bottom: 5px;
	padding-left: 5px;
	padding-right: 5px;
	padding-top: 5px;
	}

I have margin-right set to 66% (using shorthand margin property) and this is fine on 800 x 600 where the webpage takes up the whole page. On higher resolutions, because margin-right is taken from the right extreme edge of the browser, the rectangle I've created, increases in size.
Is there any way to control the right margin or edge of an element from the left edge or has someone got a way around this?

Thanks in advance for any help.

BladeMetal
Offline
newbie
Last seen: 13 years 44 weeks ago
Joined: 2006-01-17
Posts: 5
Points: 0

**SOLVED** margin-right problem on different resolutions

its ok, ive solved the problem. Need to use the width property and totally discard the margin-right.