It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Centering Frames in HTML

Centering Frames in HTML

Postby SkyNetworks on Mon May 19, 2008 2:29 pm

Hi everybody,

I'm new around here, but not very good with HTML. I've manged to get a frame structure for my website that I'm really pleased with, but I really want the frames to be centred across the width of the screen (think this is vertical?). Done lots of searching on the web for help, but not had any luck so far. Does anybody know if there's a way to do this please? Any help much appreciated.

Thanks,
Lance.

PS: Sorry if this has been asked before. I did have a look through some of the other postings here, but couldn't see anything that matched.
SkyNetworks
 
Posts: 10
Joined: Mon May 19, 2008 2:10 pm

Postby flabbyrabbit on Mon May 19, 2008 4:02 pm

Code: Select all
<div align=center>
code for frame
</div>

maybe? If not can we have a link to the page?

Flabby Rabbit
Image
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby SkyNetworks on Tue May 20, 2008 1:00 am

Thanks - wasn't sure quite where to put the code - in the frame document or in the individual pages? And whereabouts in the HTNL document it should go.

Here's a link to one of the pages (please don't laugh):

http://www.lancechinnian.com/itncorporate-1frame.html

Thanks!
SkyNetworks
 
Posts: 10
Joined: Mon May 19, 2008 2:10 pm

Postby rangana on Tue May 20, 2008 3:21 am

Flabbyrabit,

align is a deprecated attribute :(

...You should'nt be advocating it ;)
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Postby flabbyrabbit on Tue May 20, 2008 10:59 am

rangana wrote:align is a deprecated attribute :(
Well I see nothing wrong with it, it works and is very easy. At least I said to use DIVs instead of tables :wink:

SkyNetworks, your site does actually look really good but which bits do you wanted centred?? Also when I opened your site in IE7 there are still the scroll bars on the banner frames so i would suggest adding:
Code: Select all
scrolling="no"
to the frames containing "banner.html" and "itncorporate-2headline.html".

Flabby Rabbit
Image
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby rangana on Tue May 20, 2008 11:15 am

flabbyrabbit wrote:
rangana wrote:align is a deprecated attribute :(
Well I see nothing wrong with it, it works and is very easy. At least I said to use DIVs instead of tables :wink:

Flabby Rabbit


In a public forum, we should always advocate to the "latest" and mose effective way of cure. I'm not saying that I'm good with regards to w3c standard codes, but we should always observe what the spec states, and what the validator wants.

Yes, there's nothing wrong with the deprecated align the way how your site will be displayed, but then, if you'll throw your page to the validator, you'll see how it complains about the old align attribute ;)

Align is a deprecated one, it has a CSS counterpart, and i'm certain you'll provide the fix for the OP. I'm just telling you about the deprecated ones. :)
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Postby SkyNetworks on Tue May 20, 2008 11:16 am

Thanks Flabby Babbit, I'll definitely add the no scroll function to the banner frames.

I was hoping to be able to centre all the frames, so they appear as a block in the middle of the screen if that makes sense?

Cheers.
SkyNetworks
 
Posts: 10
Joined: Mon May 19, 2008 2:10 pm

Postby flabbyrabbit on Tue May 20, 2008 1:00 pm

This doesn't seem to be as easy as i first thought. I have tried quite a few things and nothing appears to be working. I have also had a quick look on google and this seems to be a common problem without a standard answer. Most people suggest remaking the site using iFrames but that will be hard to make it look right on every machine. I suggest to leave it how it is, i personally prefer how it looks now.

Never the less i will continue trying to do this as I like a good challenge.

Sorry I couldn't be much help,
Flabby Rabbit

P.S. I will post the answer if I ever find it
Image
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby SkyNetworks on Tue May 20, 2008 2:54 pm

Thanks Flabby Rabbit - really appreciate it.
SkyNetworks
 
Posts: 10
Joined: Mon May 19, 2008 2:10 pm


Who is online

Users browsing this forum: No registered users and 5 guests