26 Replies - 4191 Views - Last Post: 11 January 2011 - 06:38 PM
#16
Re: CSS h1 not working
Posted 10 January 2011 - 05:38 PM
Is there a reason why an external stylesheet worked but styling within the same file didn't?
#17
Re: CSS h1 not working
Posted 10 January 2011 - 05:44 PM
#18
Re: CSS h1 not working
Posted 11 January 2011 - 05:04 AM
eZACKe, on 10 January 2011 - 10:53 PM, said:
It doesn't matter if it is actually going into production or not, using tables for layout is bad practice, and if your just beginning why waste time learning the wrong way?
#19
Re: CSS h1 not working
Posted 11 January 2011 - 12:12 PM
KingCuddles, on 11 January 2011 - 08:04 AM, said:
eZACKe, on 10 January 2011 - 10:53 PM, said:
It doesn't matter if it is actually going into production or not, using tables for layout is bad practice, and if your just beginning why waste time learning the wrong way?
Sorry, I didn't know it was bad practice.
I guess I have Luke Welling and Laura Thomson to blame for that one
#20
Re: CSS h1 not working
Posted 11 January 2011 - 12:27 PM
eZACKe, just google for "Bad website design practises" or something like that. You will probably get a list of about 20 saying things like:
- NO TABLES
- No animated gifs
- No automatic sound
- No blinding colours
These are all things that website designers consider to be "from the 90s" and should be left there.
I understand that you are learning PHP first. Not quite sure about the logic there... you really should have a strong understanding of html and css before you learn PHP. But if you do it properly, it is not hard.
Tables = tabular data. They are very important still (though the code for them is also still horrendous) but not for layouts. Tables should not be used for layouts. It will confuse you, confuse the browser and look very ugly.
Good luck and if you have any more questions just ask!
Shane
#21
Re: CSS h1 not working
Posted 11 January 2011 - 12:48 PM
But I would like to try another tack with respect to tables versus <div> tags.
Look at your code with the tables. Better yet, let me post some:
The above was made with Microsoft's Front Page and anyone who has ever seen that kind of code knows it's truly garbage. But what I want you to do is look at the content section. You have many styles, fonts and so on described inline and not in any external style sheet. And the entire page is a set of tables.
Now, look at the content in a page that is properly laid out with <div> tags (this is the same page, reverse-engineered and with a very good menu design by CSS Menu Writer):
Now, notice that without all of the inline style junk, everything is very readable in the page. And I'm talking about reading it as code, not as a web page. There are very few inline styles. Everything is readable, there is a proper doctype declaration.
Designing a page with tables means you clutter up your text with tons of garbage the search engines have to search through. And pages like that will never get to the top of the "food chain" when it comes to the search engines. And I believe that is a direct result of using inline styling and tables to design your website.
Additionally, if you define everything with <div> tags and all text in style sheets, if someone says to you, "change this," you can make the change in a style sheet and it echos throughout the entire web site..
#22
Re: CSS h1 not working
Posted 11 January 2011 - 12:54 PM
(The PHP/MYSQL is production-quality, but the HTML/CSS is not).
#23
Re: CSS h1 not working
Posted 11 January 2011 - 12:57 PM
Dogstopper, on 11 January 2011 - 03:54 PM, said:
(The PHP/MYSQL is production-quality, but the HTML/CSS is not).
Yeah that's basically what I'm doing. I am trying to pick up the basics of HTML/CSS as I go, but I'm not about to go and change anything in it because I'm more focused on messing around with the PHP now.
By the way, what do you think of the book? I'm thoroughly enjoying it.
Thanks to everyone who replied. It gave me a lot of insight into HTML/CSS and now I know what pitfalls not to fall into when I really start digging deeper into that stuff.
#24
Re: CSS h1 not working
Posted 11 January 2011 - 01:01 PM
#25
Re: CSS h1 not working
Posted 11 January 2011 - 01:03 PM
Dogstopper, on 11 January 2011 - 06:54 PM, said:
(The PHP/MYSQL is production-quality, but the HTML/CSS is not).
Dogstopper, I expected this would be the case. I recently bought "Build Your Own Database Driven Web Site Using PHP & MySQL" by Kevin Yank as a reference guide (too often I find myself without the internet and needing reference) and he also says the same thing.
It is worth noting that a lot of PHP websites do create tables, this is because data from a database is quite often useful to be shown in tabular form (a member list for example). So tables are important to learn (though of course you can do the same in html using css to make it look like a table, but I am not sure on the general opinion of that in website standards groups).
#26
Re: CSS h1 not working
Posted 11 January 2011 - 03:05 PM
eZACKe, on 11 January 2011 - 01:12 PM, said:
KingCuddles, on 11 January 2011 - 08:04 AM, said:
eZACKe, on 10 January 2011 - 10:53 PM, said:
It doesn't matter if it is actually going into production or not, using tables for layout is bad practice, and if your just beginning why waste time learning the wrong way?
Sorry, I didn't know it was bad practice.
I guess I have Luke Welling and Laura Thomson to blame for that one
Guess what. I have the same book. For the first example about Bob's Auto Parts I was able to do without using a table for layout. I actually didn't use CSS because I really didn't care about making it "pretty".
#27
Re: CSS h1 not working
Posted 11 January 2011 - 06:38 PM
|
|

New Topic/Question
Reply




MultiQuote







|