tables and divs

Soldato
OP
Joined
2 Oct 2004
Posts
4,362
Location
N.W London
hey guys,

thanks for your help so far and all the responses you lot are like a breathe of fresh air...

im following the tutorials over at w3c and hopefully can put something together in a week or so to show you how its coming along...

I have a question I was hoping you guys can help me with pls?

I am at the form stage under HTML section and its getting to a point where there is a lot of coding...

I will never remember it all especially if I dont create a website for a few months after creating my very first one....

So how do you guys manage to remember all the different varities of code? all the diff commands?

Do you save it in text files?

Any tips of doing this the "right way" would be most appreciated....

Cheers guys!!!

:)
 
Man of Honour
Joined
31 Jan 2004
Posts
16,335
Location
Plymouth
There's not much to learn with basic (X)HTML or CSS. I don't really need to lookup HTML/CSS stuff, although reading the W3C specs in full is something on my to-do-really-soon-honest list.

Browser hacks can be a bit of a pain but that's sorted by either a bit of Googling or guesswork.

Bookmarks are also really handy (see a useful site - always add it to your favourites), and these cheat sheets are great to stick on a wall or bookmark for quick reference :)

Different things also have their own sites - for example Apache, PHP and MySQL have fantastic documentation which I use quite a lot.
 
Soldato
OP
Joined
2 Oct 2004
Posts
4,362
Location
N.W London
hey those cheat sheets are great thanks :)

see at the moment I need to create a site...so was reading thru w3c to first understand what the diff bits of code to and their functions and then I would implement it..

However as stated above as Im progessing through the tuts its getting confusing only becuz there is a lot of code atm....and I havent even got to CSS lol

so thought i would ask you guys how you manage to remember all that? I will create about 2 - 3 sites and then wont need to do so for a while in which time I will prob forgot what I learnt...therefore needed some help and clarification on how you guys do it...

Thanks mate...
 
Man of Honour
Joined
31 Jan 2004
Posts
16,335
Location
Plymouth
I think things are always hard to memorise until you understand them, and you only understand through experience.

It's actually really simple to write a page once you know the basic elements...headings go in <h1> (sub-headings in <h2> and so on), paragraphs go in <p>, unorderd lists go in <ul> and then their items in <li> (list item), and so on.

Then for CSS, you'll soon realise what all this positioning/margins/padding/float stuff is as you play with it :)

So as for how I do it....learn over time, and keep bookmarks as references incase I'm rusty on something :)
 
Soldato
Joined
2 Dec 2005
Posts
5,515
Location
Herts
Hi again xirokx, sounds like your learning a lot :)

I think I've said this before, but I find Dreamweaver's code view really useful for giving me properties etc. All options come up in that little box as you type, so even if you don't know of the correct value you can experiment with other possibilities.

Keep up the good work
 
Soldato
OP
Joined
2 Oct 2004
Posts
4,362
Location
N.W London
hey thanks for your comments joeyjoe and beansprouts...

thanks for the useful tips beansprouts

fyi joey im learning but at the stage where i dont know enough and am really tempted to create something...lol ......but cannot because I dont know enough...sure I understand basics with html I know what beansprouts is talking about...next stop CSS....

For example 2 days ago I created a header, nav bar, main body and footer using tables added colour and text etc center aligned it and was quite pleased with myself. However deep down I know this is incorrect because I should not use tables for layout. So I have to remain patient read up on CSS and then try and create a layout using CSS and Divs so I learn the proper way.

Also at this stage I have to spend a lot of time reading and implementing what I read so that when I look at webpages I know how things are done and what properties are used. This way not only does editing become a lot easier but I am learning how to use the properties I want/need....

I just have to remain patient but its hard - all theory and no practical makes me a dull guy - which I am not :p

Thanks for the encouragment hopefully I will have something up and running soon and as I get confused I comeback for more clarification at which point you guys offer invaluable advice...

Cheers guys!!!
 
Associate
Joined
21 May 2003
Posts
1,365
Some suggestions:
1. Get yourself a decent text editor (if you haven't already) - notepad++ is a good one, there are lots of others (see the sticky), and everyone has a favourite but it's mainly down to personal taste. This will syntax highlight (change the colour of certain elements) for you and make your code much much easier to read. Anyone telling you that "proper coders" only use windows notepad is either lying or an idiot.

2. Do your main testing in Firefox and then tweak for IE - Firefox renders (displays) html in a fairly reliable and standards compliant way. If your site looks ok in Firefox, then it will most likely look ok in Opera / Safari / etc... and should only need the occasional fix for IE. If you develop for IE and then check the final result in Firefox, you may find it looks like a bag of spanners and will take a lot more effort to fix this way round.

3. Don't get tempted to go div crazy - divs are just containers for grouping other "proper" elements. If you don't need to group, you don't need a div. You can style any html element using the class or id selectors.
e.g.
Code:
<div id="navMenu">
  <ul>
    <li>nav1</li>
    <li>nav2</li>
    <li>nav3</li>
  </ul>
</div>

can become:

<ul id="navMenu">
  <li>nav1</li>
  <li>nav2</li>
  <li>nav3</li>
</ul>

4. Use the right selector - if there is only going to be one occurence of a particular item (e.g. your navigation bar) then use id. If there are (or might be) multiple occurences of an item (e.g. a news post) then use class. You can get away with breaking this rule and most browsers won't complain, but it's not a good habit.

5. Learn by doing - the best way of learning is to have a goal and keep pottering away until you get there. It's very easy to get side-tracked if you don't have a final vision for what you're doing and are just trying examples from books or websites. Choose something that interests you and make a website about it.
 
Soldato
OP
Joined
2 Oct 2004
Posts
4,362
Location
N.W London
hey thanks for your help very interesting indeed :)

1. I use dreamweaver is that OK?
2. I really didnt know that about firefox but from now on will create whatever I do for viewing in firefox and then change it if req for IE
3. Still learning about divs but points noted..
4. points noted
5. I am working to something at the moment....but as I am also learning about properties and attributes along the way its a lot of info...

Most days my brains are fried...big time...but I guess you all went thru this at some stage...its what happens when one is learning i gather??

thanks for your help mate most appreciated...
 
Associate
Joined
21 May 2003
Posts
1,365
Dreamweaver is great if you stick to the code view and don't trust the design view as to how your layout will actually look. It's got a lot better since version 8 but it's still not 100% accurate. Always test in real browsers - it's generally a good idea to have Firefox and IE open and check in both when you make a change.

Eventually it will all click in to place, there is a logic behind html structure and once it comes into focus things get a lot easier. Don't be afraid to keep using references though, there's no need to memorise every tag and attribute.

Also, use what's already available - borrow or steal ideas from other websites - as long as you dont copy them verbatim then it's not an issue.
 
Soldato
OP
Joined
2 Oct 2004
Posts
4,362
Location
N.W London
hey lazy

thanks for your help mate :) most appreciated...

Im now beginning learning CSS and Divs and slowly but surely am trying to get it all to come together so I can create a website and get all your thoughts and comments on it....

Do you know of any good links for CSS and Div layouts so I could take a look at the code and how the creator developed the site etc???

Practice makes perfect so the more I learn and mess around with code the more familiar it will get....what do you guys reckon?

thanks everyone :)
 
Associate
Joined
21 May 2003
Posts
1,365
There are loads of useful resources in the sticky so just have a browse through the css and xhtml sections.

I find it useful to visualise a layout im going for on paper first, then draw boxes around groups of elements to highlight the divs etc.

Here's an example of how i'd go about starting to write the markup for news.bbc.co.uk
 
Soldato
OP
Joined
2 Oct 2004
Posts
4,362
Location
N.W London
appreciate the tips lazy cheers pal ....

I'm using firefox and IE6 to view my site as I develop it...

I find if its aligned perfectly in firefox its not in IE6...

How can I overcome this?

Also does anyone know any good BEGINNER tutorials for flash 8 ????

Or any version of flash?

Would be great if someone knew of something....

Thanks guys....you guys continue to inspire me :)

Most appreciated....
 
Soldato
Joined
3 Aug 2005
Posts
4,534
Location
UK
xirokx said:
appreciate the tips lazy cheers pal ....

I'm using firefox and IE6 to view my site as I develop it...

I find if its aligned perfectly in firefox its not in IE6...

How can I overcome this?
Not sure exactly what you mean by "aligned perfectly", but you may be in the market for a Box Model Hack — there's a good explanation of the problem with a number of potential fixes (aka "hacks") on that page :)
 
Back
Top Bottom