Coding questions

Right, another question.

Regarding the image I pointed to earlier, I'm just working out the best way to do the seperators in the three column 'what we do | our experience | want more'.

Obviously I could do it in a fiddly way, but I want it to be done so that the whatever the size of the 'what we do | our experience..' div it will be that size, less say 10px at the top and 10px at the bottom.

So basically, something like this [but I'm pretty sure that wont work :p]:

div#sep { height:100%-20px; vertical-align:center; }

The best I can do at the moment is have it about 85%. It's not far off what I want, but not quite there.

Any help's appreciated :)
 
Well here I am again.

A quick question: Is height:100%px; ok? Surely it can't be, but it has just fixed my problem.

I stumbled accross it whilst messing about in firebug, left the px in there whilst I changed it to 100% (by accident) and it worked. 100% doesn't work for some reason, maybe because of something else I've got in the code, but I really can't see any height limits in px that would stop 100% being exactly that.
 
Nope, that's an invalid declaration. height:100%; is very hit and miss as it is. Not overly sure why though. I think it's to do with its parent needing a height declaration too.

But in short, 100%px is wrong :)
 
That's a bummer, worked perfectly too, on all 3 browsers tested on (FF3, Safari3, Chome [IE has a seperate problem that stops me testing that at the moment :p]

Cheers.
 
What are you trying to change with it? There will be a proper way to fix whatever 100%px fixed I'm sure.
 
Yeah, there will be, but it was a nice little hack whilst it lasted :D

I'm changing the height of the box 'We take the Jargon out of Web Design'. At the moment no matter what content is in there it will be that height, but all the heights are 100%. I'll keep battling through on it though.

Link for the image
 
So you want it to be 100% the height of its container? And to expand as content is added?
 
Yeah that's it Harry. I assumed 100% would let the content do it's thing, whilst the padding adds the padding round the edges, afterall I don't see where it would get the 100% px value from otherwise :confused:
 
Works a treat cheers Harry, surprised that code works as it's a hack but it works and does what's needed without relying on 100%px :lol:

Thanks again.

Seemingly 'height:x px;' doesn't really matter, although I'm sure there's a reason for it, probably to do with IE as you hinted at on your Web Design+
 
Code:
selector {  min-height:500px;/*Used by FF, IE7+ etc*/  height:auto !important;/*Used by all, ignored by IE6*/  height:500px;/*Used only by IE6 as IE6 ignores !important on duplicate declarations*/}
 
Cheers Harry. Hopefully it works on IE, can't check that just yet gotta sort some bits out on it first.

:hateie:
 
Yeah that's cool, I just meant on my end, with the amount of CSS code I have at the moment who knows what's gonna happen :D
 
Back
Top