![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| CSS CSS styling code help for your website, CSS is like art and what makes your website look professional. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #11 | ||
| "James Luff" <james.luff@nospamdsl.pipex.com> wrote in message news:orudnXs_S_zoiVfZnZ2dnUVZ8t2dnZ2d@pipex.net... > Jamie Allison wrote: >> As i thought the height 100% does not make the table 100% the height of >> the screen but 100% height of the HTML document. There is nothing else >> apart form what is in the table so the table shrinks to fit its contents. > > I understand this, but how does the tutorial I linked to work? > > http://www.quirksmode.org/css/centering.html > > That has the content centred on the page. Why does his version work and > not mine? I haven't had time to look through and compare the two but how about taking a look at this. > >> One way would be to possibly set the height in pixels suck as 768 but >> then this will only work for certain screen resolutions. > > Indeed, but as you say, this only work for a certain screen resolution. > >> Why are you wanting it centred on the screen? Maybe you could achieve a >> similar thing by doing a top margin of x amount? > > Why? It is mainly just a design aesthetic. The idea of using a top margin > of x gives the same problem, what value of x? The value will always be > different depending on screen resolution. > > I appreciate your efforts in trying to help me. Any chance you could > investigate the working example above and see if you can spot how it > works? > > -- > regards, James Luff Gamertag: Lufferov > remove 'nospam' to e-mail > "There are 10 types of people in the world: > Those that understand binary, and those that don't." | |||
| Advertisements |
| | #12 | ||
| "Jamie Allison" <jamie@jamieallison.co.uk> wrote in message news:vcednaSW557rgFfZRVny3g@bt.com... > > "James Luff" <james.luff@nospamdsl.pipex.com> wrote in message > news:orudnXs_S_zoiVfZnZ2dnUVZ8t2dnZ2d@pipex.net... >> Jamie Allison wrote: >>> As i thought the height 100% does not make the table 100% the height of >>> the screen but 100% height of the HTML document. There is nothing else >>> apart form what is in the table so the table shrinks to fit its >>> contents. >> >> I understand this, but how does the tutorial I linked to work? >> >> http://www.quirksmode.org/css/centering.html >> >> That has the content centred on the page. Why does his version work and >> not mine? > > I haven't had time to look through and compare the two but how about > taking a look at this. Oops..... Take a look at this i meant. http://www.jamieallison.co.uk/test.html I've mangled your code and the examples code into one file. Obviously you can take the css out into a css file and all should work fine. Regards Jamie > > >> >>> One way would be to possibly set the height in pixels suck as 768 but >>> then this will only work for certain screen resolutions. >> >> Indeed, but as you say, this only work for a certain screen resolution. >> >>> Why are you wanting it centred on the screen? Maybe you could achieve a >>> similar thing by doing a top margin of x amount? >> >> Why? It is mainly just a design aesthetic. The idea of using a top margin >> of x gives the same problem, what value of x? The value will always be >> different depending on screen resolution. >> >> I appreciate your efforts in trying to help me. Any chance you could >> investigate the working example above and see if you can spot how it >> works? >> >> -- >> regards, James Luff Gamertag: Lufferov >> remove 'nospam' to e-mail >> "There are 10 types of people in the world: >> Those that understand binary, and those that don't." > > | |||
| | #13 | ||
| "Jamie Allison" <jamie@jamieallison.co.uk> wrote in message news:guadncZBNdJOgFfZnZ2dnUVZ8sydnZ2d@bt.com... > > "Jamie Allison" <jamie@jamieallison.co.uk> wrote in message > news:vcednaSW557rgFfZRVny3g@bt.com... >> >> "James Luff" <james.luff@nospamdsl.pipex.com> wrote in message >> news:orudnXs_S_zoiVfZnZ2dnUVZ8t2dnZ2d@pipex.net... >>> Jamie Allison wrote: >>>> As i thought the height 100% does not make the table 100% the height of >>>> the screen but 100% height of the HTML document. There is nothing else >>>> apart form what is in the table so the table shrinks to fit its >>>> contents. >>> >>> I understand this, but how does the tutorial I linked to work? >>> >>> http://www.quirksmode.org/css/centering.html >>> >>> That has the content centred on the page. Why does his version work and >>> not mine? >> >> I haven't had time to look through and compare the two but how about >> taking a look at this. This was still bugging me and now i think i've found why. Take the line out the top of your code saying it is transitional and i think it may work. Not sure why but maybe transitional doesn't support some of the css used? If i put transitional ontot he top of the test page i done then it no longer centers. > > Oops..... Take a look at this i meant. > http://www.jamieallison.co.uk/test.html > > I've mangled your code and the examples code into one file. Obviously you > can take the css out into a css file and all should work fine. > > Regards > > Jamie > >> >> >>> >>>> One way would be to possibly set the height in pixels suck as 768 but >>>> then this will only work for certain screen resolutions. >>> >>> Indeed, but as you say, this only work for a certain screen resolution. >>> >>>> Why are you wanting it centred on the screen? Maybe you could achieve >>>> a similar thing by doing a top margin of x amount? >>> >>> Why? It is mainly just a design aesthetic. The idea of using a top >>> margin of x gives the same problem, what value of x? The value will >>> always be different depending on screen resolution. >>> >>> I appreciate your efforts in trying to help me. Any chance you could >>> investigate the working example above and see if you can spot how it >>> works? >>> >>> -- >>> regards, James Luff Gamertag: Lufferov >>> remove 'nospam' to e-mail >>> "There are 10 types of people in the world: >>> Those that understand binary, and those that don't." >> >> > > | |||
| | #14 | ||
| Jamie Allison wrote: >>>> I understand this, but how does the tutorial I linked to work? >>>> >>>> http://www.quirksmode.org/css/centering.html >>>> >>>> That has the content centred on the page. Why does his version work and >>>> not mine? >>> I haven't had time to look through and compare the two but how about >>> taking a look at this. > > This was still bugging me and now i think i've found why. > > Take the line out the top of your code saying it is transitional and i think > it may work. Not sure why but maybe transitional doesn't support some of > the css used? If i put transitional ontot he top of the test page i done > then it no longer centers. DING, DING, DING, DING, DING, DING. BINGO! I was just in the middle of typing a reply claiming I had copied and pasted your code only for it to still sit at the top of the page when I saw your follow-up. Now I have removed the line of code referencing the transitional code at it all works without me having to change anything. Thank you so much for your time and effort, I had been racking my brain for days over this and hadn't given any thought to that first line. Everything now sits nicely centred on the page as I had intended, BRILLIANT! -- regards, James Luff Gamertag: Lufferov remove 'nospam' to e-mail "There are 10 types of people in the world: Those that understand binary, and those that don't." | |||
| | #15 | ||
| "James Luff" <james.luff@nospamdsl.pipex.com> wrote in message news:BPmdndV-rvzDuVfZRVnytw@pipex.net... > Jamie Allison wrote: >>>>> I understand this, but how does the tutorial I linked to work? >>>>> >>>>> http://www.quirksmode.org/css/centering.html >>>>> >>>>> That has the content centred on the page. Why does his version work >>>>> and not mine? >>>> I haven't had time to look through and compare the two but how about >>>> taking a look at this. >> >> This was still bugging me and now i think i've found why. >> >> Take the line out the top of your code saying it is transitional and i >> think it may work. Not sure why but maybe transitional doesn't support >> some of the css used? If i put transitional ontot he top of the test >> page i done then it no longer centers. > > DING, DING, DING, DING, DING, DING. BINGO! > > I was just in the middle of typing a reply claiming I had copied and > pasted your code only for it to still sit at the top of the page when I > saw your follow-up. Now I have removed the line of code referencing the > transitional code at it all works without me having to change anything. > > Thank you so much for your time and effort, I had been racking my brain > for days over this and hadn't given any thought to that first line. > > Everything now sits nicely centred on the page as I had intended, > BRILLIANT! Happy to help....... I am hoiping to do a similar layout with a site i am soon to design for a friend so now i know how to get the centering working :-) > > -- > regards, James Luff Gamertag: Lufferov > remove 'nospam' to e-mail > "There are 10 types of people in the world: > Those that understand binary, and those that don't." | |||
| | #16 | ||
| Jamie Allison wrote: >> DING, DING, DING, DING, DING, DING. BINGO! >> >> I was just in the middle of typing a reply claiming I had copied and >> pasted your code only for it to still sit at the top of the page when I >> saw your follow-up. Now I have removed the line of code referencing the >> transitional code at it all works without me having to change anything. >> >> Thank you so much for your time and effort, I had been racking my brain >> for days over this and hadn't given any thought to that first line. >> >> Everything now sits nicely centred on the page as I had intended, >> BRILLIANT! > > Happy to help....... I am hoiping to do a similar layout with a site i am > soon to design for a friend so now i know how to get the centering working > :-) Hmmm, well having done some more investigation if I put any doctype declaration at the top of the page then the centring falls over. With no DocType it cocks up the menu in certain browsers and the layout is subtly different. It seems I can't have my cake and eat it, which always seemed a bit pointless. Who wants a cake they can't eat! Seems I'll have to choose between centring the page and having it display correctly. I can't really afford the luxury of having different layouts on different browsers so the centring will have to go and the doctype will have to return. It's a real shame because now that I've seen it centred I really don't want to go back :-( -- regards, James Luff Gamertag: Lufferov remove 'nospam' to e-mail "There are 10 types of people in the world: Those that understand binary, and those that don't." | |||
| Featured Websites | ||||
|
![]() |
| Tags: centering, vertical |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to include multiple frames in frameset without predefined dimensions/vertical scrollbar | Don Schneider | HTML | 0 | 07-01-2007 1:45 PM |
| Featured Websites | ||||
|