• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

please help with coding


TomStutt

Senior Member
#1
Hi all

I have an image of myself on my home page with some text on the right of it but there is a massive gap between them and I cant work out how to reduce this.

can someone help please.

tomstuttdesign.co.uk

thanks all
 

tim

Senior Member
#2
HTML:
#content-top-left {

	float: left;
	width: 15%;
	overflow: hidden;
	padding-right: 15px;
	}
	
#content-top-right {

	float: right;
	width: 80%;
	overflow: hidden;
	}
as far as im aware, that ^ should be this:

HTML:
#content-top-left {

	float: left;
	width: 15%;
	overflow: hidden;
	padding-right: 15px;
	}
	
#content-top-right {

	float: right;
	width: 85%;
	overflow: hidden;
	}
 

tim

Senior Member
#10
it'd only vary if you changed the width of the container.

and then it's your fault if you dont ammend it...

easy thing about percentage is your not messing around with figures, you just know you need to share it equally off 100%.
 
#12
Is there a major difference in using % instead of pixels?
I much prefer to use pixels.

I don't actually know the reason for both - needs to do some research I think
 

tim

Senior Member
#13
not as far as im aware.

imo all the difference is that percentage makes it a lot more round and easier to control whats going on.
 

Renniks

Senior Member
#14
Pixels are a set number of pixels... the width will appear the same on the persons computer regardless of their browser setup?
Percentage depends on how they are viewing the site not how their monitors resolution is... its a percent of their window?

(Notice the question marks as I am not 100% sure on this... :( )
 

Kevin

Senior Member
#15
Yes, % is a relative value, depending on the size of the browser window (not the screen resolution). Percentages are mostly used in fluid layouts, and for some other stuff I can't come up with from the top of my head :p
 

Renniks

Senior Member
#16
I feel if you have a set image width in pixels, you should also have a set container width... as there will be no issues at all...

a 100 pixel wide image will ALWAYS fit in a 110 pixel wide container if there are no CSS controls to stop it :D