Ok I seem to be on some learning curve here, but I start playing with master pages today, veiwed the videos on this site that had anything to do with CSS and master pages. The problem is they all use tables and templets(which isnt even in 2008) to set up
there master pages. Now from doing some research everyone seems against the idea of using tables in websites due to browser issues. The questions I have are;
1. Does that apply to the templates from 2005 that breeak up your site for you into boxes for such things as header/footer/tree? If not were do I find them in 2008?
2. Can someone derect me to what I need inorder to produce the same effects on my site?
Sorry for the basic type questions, im having no problem with the code, but the creation tools are less then friendly in 2008
Master pages can be used without using tables for layout, in fact my own site
www.yougodo.com does just this.
You simply use <asp:contentplaceholder runat="server" /> controls in the master page to define the non-static content areas. You can then populate these with any html you like.
A masterpage does not need to incorporate tables at all. There is nothing in the control that requires it to use content placeholders as tables. I have written a site that is based on masterpages, and it doesn't have a table in the whole site. Well
that isn't exactly true, I cheated and used login controls without css friendly adapters. Well anyways, you don't need to use tables at all, no matter how much quicker they make things.
I guess my question would be, are you coding all in HTML then or using C# or VB along with it?
It seems a major undertaking to find good examples of code that doesnt include tables in HTML, im trying to research and find what I can on it, but it seems like 90% of the programmers are still using it that way. What im looking for is the ability to break
up my web page without using them sense it seems that everyone is advising against its but without having any advise on how to get around it =(
We can use tables where ever we want. Infact why it is said that do not tables shold be understanded first. There is no browser issue with tables itself. Its the usage of tables that makes or creates problems in different browsers. If you use proper xhtml
and required tags like id, caption, use styles, and do not use tags that are obsolete like width and height then there would be no problems.
And you can use tables in a master page. And Microsoft 2008 is not creating difficulties, it is creating ease with some changes and understandings.
Do mark as answer if it helps
Best Regards
Ali Sufyan Butt
Sr.Software Engineer
Talented Earth Organization
You can definitely use tables for layout but they'll give you problems when dealing with fluid layouts and resized browsers. It's like you need to drive a screw and drive a nail. Would you use a hammer for both, or a hammer for the nail and a screwdriver
for the screw? Table's are meant for presenting tabular data. CSS is used for layout positioning. You can use CSS for tabular data if you want, and tables for layouts. But they are each geared to their own tasks. Take a read here:
Actually W3C also supports table layouts, but there are quite a few complex things to do to make it validate. The reason it's part of W3C specs is coz there was no CSS earlier and the specs included table layouts. We can use both, but I prefer tableless
layouts and tables for data presentation.
"If I can see further than anyone else, it is only because I am standing on the shoulders of giants."blog: www.heartysoft.com twitter: @ashic
Wow I posted this quite awhile ago hehe, sense then I have really become accustomed to using CSS both within visual studio and out. But the one thing I dont seem to able to nail down is how to set them up were it all resizes correctly when the user increases
and decreases font manuely through the browser settings. Not sure if percentages are the way to go or if there is really a benifit of doing it % versus pixal, I personaly havent seen much of a difference yet, other then percentages seeming to be more of a
pain to deal with. I dont use any absolutes, and everything is set on float, so if yah have any good links on actualy making the CSS's fluid in sizing please feel free. And have honestly yet to find a senario were I really needed a table, even with tons of
dataentry fields.
VB_Gone-Wild
Participant
815 Points
437 Posts
Master Pages
Feb 26, 2008 12:59 AM|LINK
Ok I seem to be on some learning curve here, but I start playing with master pages today, veiwed the videos on this site that had anything to do with CSS and master pages. The problem is they all use tables and templets(which isnt even in 2008) to set up there master pages. Now from doing some research everyone seems against the idea of using tables in websites due to browser issues. The questions I have are;
1. Does that apply to the templates from 2005 that breeak up your site for you into boxes for such things as header/footer/tree? If not were do I find them in 2008?
2. Can someone derect me to what I need inorder to produce the same effects on my site?
Sorry for the basic type questions, im having no problem with the code, but the creation tools are less then friendly in 2008
gavinharriss
Participant
932 Points
318 Posts
Re: Master Pages
Feb 26, 2008 02:05 AM|LINK
Hi,
Master pages can be used without using tables for layout, in fact my own site www.yougodo.com does just this.
You simply use <asp:contentplaceholder runat="server" /> controls in the master page to define the non-static content areas. You can then populate these with any html you like.
Hope that helps ;)
Portfolio: www.gavinharriss.com
ScottConrad
Member
146 Points
67 Posts
Re: Master Pages
Feb 26, 2008 02:33 AM|LINK
A masterpage does not need to incorporate tables at all. There is nothing in the control that requires it to use content placeholders as tables. I have written a site that is based on masterpages, and it doesn't have a table in the whole site. Well that isn't exactly true, I cheated and used login controls without css friendly adapters. Well anyways, you don't need to use tables at all, no matter how much quicker they make things.
VB_Gone-Wild
Participant
815 Points
437 Posts
Re: Master Pages
Feb 26, 2008 02:49 AM|LINK
I guess my question would be, are you coding all in HTML then or using C# or VB along with it?
It seems a major undertaking to find good examples of code that doesnt include tables in HTML, im trying to research and find what I can on it, but it seems like 90% of the programmers are still using it that way. What im looking for is the ability to break up my web page without using them sense it seems that everyone is advising against its but without having any advise on how to get around it =(
AliSufyanBut...
Contributor
2169 Points
626 Posts
Re: Master Pages
Feb 26, 2008 04:03 AM|LINK
Rumours Rumours Rumours..
We can use tables where ever we want. Infact why it is said that do not tables shold be understanded first. There is no browser issue with tables itself. Its the usage of tables that makes or creates problems in different browsers. If you use proper xhtml and required tags like id, caption, use styles, and do not use tags that are obsolete like width and height then there would be no problems.
And you can use tables in a master page. And Microsoft 2008 is not creating difficulties, it is creating ease with some changes and understandings.
Best Regards
Ali Sufyan Butt
Sr.Software Engineer
Talented Earth Organization
HeartattacK
All-Star
55262 Points
5917 Posts
Moderator
MVP
Re: Master Pages
Aug 29, 2008 06:24 AM|LINK
You can definitely use tables for layout but they'll give you problems when dealing with fluid layouts and resized browsers. It's like you need to drive a screw and drive a nail. Would you use a hammer for both, or a hammer for the nail and a screwdriver for the screw? Table's are meant for presenting tabular data. CSS is used for layout positioning. You can use CSS for tabular data if you want, and tables for layouts. But they are each geared to their own tasks. Take a read here:
http://css-discuss.incutio.com/?page=TablesVsDivs
http://www.htmlite.com/SD008.php
blog: www.heartysoft.com
twitter: @ashic
AliSufyanBut...
Contributor
2169 Points
626 Posts
Re: Master Pages
Aug 29, 2008 07:17 AM|LINK
Still we can use both, No problem in using tables.
But if we follow proper W3C web standards then we should follow tableless environment, and use div's
Best Regards
Ali Sufyan Butt
Sr.Software Engineer
Talented Earth Organization
HeartattacK
All-Star
55262 Points
5917 Posts
Moderator
MVP
Re: Master Pages
Aug 29, 2008 07:32 AM|LINK
Actually W3C also supports table layouts, but there are quite a few complex things to do to make it validate. The reason it's part of W3C specs is coz there was no CSS earlier and the specs included table layouts. We can use both, but I prefer tableless layouts and tables for data presentation.
blog: www.heartysoft.com
twitter: @ashic
AliSufyanBut...
Contributor
2169 Points
626 Posts
Re: Master Pages
Aug 29, 2008 07:58 AM|LINK
I do agree with Heartattack on tableless layouts. prefer it, but can use others as well
Best Regards
Ali Sufyan Butt
Sr.Software Engineer
Talented Earth Organization
VB_Gone-Wild
Participant
815 Points
437 Posts
Re: Master Pages
Aug 29, 2008 08:02 AM|LINK
Wow I posted this quite awhile ago hehe, sense then I have really become accustomed to using CSS both within visual studio and out. But the one thing I dont seem to able to nail down is how to set them up were it all resizes correctly when the user increases and decreases font manuely through the browser settings. Not sure if percentages are the way to go or if there is really a benifit of doing it % versus pixal, I personaly havent seen much of a difference yet, other then percentages seeming to be more of a pain to deal with. I dont use any absolutes, and everything is set on float, so if yah have any good links on actualy making the CSS's fluid in sizing please feel free. And have honestly yet to find a senario were I really needed a table, even with tons of dataentry fields.