I want to become a Web Designer / Developer...

Associate
OP
Joined
10 Jan 2008
Posts
1,677
Location
Nottinghamshire
Trade with someone. They teach you HTML/CSS and you teach them how to water cool.

You can add me on MSN/Steam/Skype if you ever need any CSS/HTML help. Just send me a trust for my info.

Loving it lol. Really appreciate the help mate and I will add you to MSN.

Thanks again,

RoEy
 
Associate
Joined
7 Dec 2007
Posts
302
Location
Derbyshire, Tibshelf
I reckon Dreamweaver is a waste of money personally. It's got a few cool wizards for creating odd stuff but as soon as you edit them in the slightest outside of the wizard it abandons you like a single mother in the 1800s.

I started off with Notepad++ and phpMyAdmin and slowly moved towards Netbeans (for xDebugging and other great features like Ctrl + Alt + o then opening files quickly) and MySQL Workbench :)
 
Associate
OP
Joined
10 Jan 2008
Posts
1,677
Location
Nottinghamshire
The SAMS teach yourself HTML & CSS book is teaching me XHTML 1.1. I couldnt find anywhere on the site I got it from that said 1.1. It just said HTML & XHTML. Am I wasting my time learning XHTML 1.1? Or can I learn it and easily move over to 1.0 strict?

RoEy
 
Associate
Joined
19 Jun 2010
Posts
1,695
Location
Southampton City Centre
It's like splitting hairs. There really isn't much concern over learning the basics. Only worry about the advanced stuff when you understand it all. You can't really learn anything wrong at that level. Everything after is best practice.

It's like when people go to the gym and want the most efficient fast way to gain muscle, when really the best thing is to just get stuck in.
 
Associate
OP
Joined
10 Jan 2008
Posts
1,677
Location
Nottinghamshire
It's like splitting hairs. There really isn't much concern over learning the basics. Only worry about the advanced stuff when you understand it all. You can't really learn anything wrong at that level. Everything after is best practice.

It's like when people go to the gym and want the most efficient fast way to gain muscle, when really the best thing is to just get stuck in.

Yeah you're right mate. I normally take notes when learning new stuff too but I'm finding it easier to just do it. I feel like a complete novice because I'm so used to Dreamweaver. I understand CSS and have used it for years, in dreamweaver but now I'm messing around coding it from scratch which is a lot more rewarding, but, it takes a lot longer. I hope I'll get quicker as I get used to it more because I can still see a need for Dreamweaver. However, it will benefit me greatly to finally understand what's going off under the 'hood'.

RoEy
 
Associate
OP
Joined
10 Jan 2008
Posts
1,677
Location
Nottinghamshire
Hi all,

I've been getting stuck into my book for the last week and a half and so far I'm really enjoying it. I read a small bit then play loads so I've not managed to read a lot. I'm finding out that doing and messing around is helping me to learn a lot.

I've coded a website, by hand, no Dreamweaver whatsoever! I did a quick design of it in Fireworks so I could visualise it and then I began work on coding it.

Design:I know I'm no designer but I do like to try.

design.jpg


Website:

http://www.medenschool.co.uk/web/beatles/index.html

I'm a big Beatles fan, as you can probably tell so I just did something I'm interested in because I feel I need to create something to implement my new skills in.

Now because the navigation and content area overlap the brown horizontal areas I had to use quite a few divs to create the 'illusion' that they have, in fact, overlapped but the truth is they haven't :(. Here is the layout I did, minus the text, images etc..

<div id="top">
<div id="top_text"> image here </div>
</div>

<div id="header">
<div id="banner"> image here </div>
</div>

<div id="nav_container">
<div id="nav">
<ul>
<li> links here </li>
</ul>
</div>
</div>

<div id="main">
<div id="content">
image / text here
</div>
</div>

<div id="main_2">
<div id="content_bottom"> </div>
</div>

<div id="footer">
<div id="footer_text">
image here
</div>
</div>

Now doing it that way is perfectly fine but as I'm sure you can appreciate there is rather a lot of divs involved and obviously for each div requires a CSS rule/s.

I was reading my book today and it talked about absolute positioning. This really appealed to be because I instantly thought instead of using all them divs (in a relative sense, even though I've never specified the position, which I've read means the Divs are static) I could get the layout done in 4 or 5 divs instead of 9/10 which means less code and less development time. It all seemed like it would work, in my head, and then I started to experiment.

I thought this would work:

<div id="top"> </div> -

<div id="header"> </div>

<div id="nav"> </div> (Set to absolute and center and position on header, overlap.)

<div id="content"> </div> (Set to absolute and center and position on footer, overlap.)

<div id="footer"> </div>

It appears I can't get my absolute position divs to center align, gutted. I’ve googled it and tried a few hacks but they don't work and I don't like the idea of having to use them.

So my questions are:

  1. Was they way I originally laid it good enough?
  2. Is there a way to center align an absolute position div?
  3. Is there another, more efficient way to achieve the layout I've designed?


I know this is a long post but I thought I'd ask you guys before I start to pull all of my hair out. I'm only a week into this so don't go too hard on me. :p

RoEy
 
Last edited:
Soldato
Joined
15 Jul 2008
Posts
3,618
Location
Glasgow
Im not an expert, but ill share my thoughts/opinions.

1. Seems fine to me. a lot of sites use a lot of div's. Id recomend instaling the firefox add-on called firebug. Then have a look at the way websites are built. This is easier than wading through the page source.

2. Here is a fairly quick read on CSS positioning. Id recomend bookmarking this website, as it has lots of great articles. Link Sounds like relative pos would be better here.

3. Not sure how to answer, there are a few diferent ways you could go about it tbh. One thing to remember is that the edge of a div dosent need to be the edge of a image/colour panel. So in this instance you could have a 1px wide image streched as background in the body.

Hope ive explained this right, and its of use to you. :)
 
Associate
OP
Joined
10 Jan 2008
Posts
1,677
Location
Nottinghamshire
Hi Pieplough,

Thanks for your reply. I'll check out firebug, that sounds like a great little feature. Cheers for the link, I've bookmarked it and will have a read.

I know I could have used have used a 1px wide image and repeated it as a background image but that wouldn't totally solve it. Because the lighter colour background, inline with the text wouldn't grow as the content does in which I have it currently.

I just thought that absolute positioning would solve it for me.

Anyway, thanks for the info mate.

RoEy
 
Associate
Joined
19 Jun 2010
Posts
1,695
Location
Southampton City Centre
Quick note: Put whole site in one div then center that div and give it a width of your site. Then everything inside doesn't need to be centered.

Margins/Centering:
Also "margin: 0 auto" will center a div. 0 is margin-top: anything other than 0 there needs a px after it. IE margin: 10px auto;
Same goes for padding, border-width etc in terms of making it all on one line. think of it like a clockwise clock. 12, 3, 6, 9. Top Right Bottom left.
Margin: 10px 0 0 10px;

Reset CSS
I tend to always use a reset.css (The 960 grid one) to make everything run more smoothly.
http://www.fabieno.com/css/reset.css

When to DIV
You have a div for id="footer_text". You already have a footer div, anything inside that can be styled via footer. If it's an image div#footer img {} or text div#footer p {}. Always consider "Do I need this div?"


These are just basic tips for good practice, there's a lot to learn for CSS, check out the CSS Guru thread to see examples of how much further it can go.

You've made an amazing start, I even checked it in IE6 and it looks good.

Just remember, if it doesn't work the way you want, figure out a way :) don't change your design based on your ability, change your ability based on your design.

Keep it up!

p.s.

Create Your Own Reset.css

30 Best HTML Practices
30 Best CSS Pratices

How to Design/Code a flexible website
Complex design into CSS/HTML
 
Last edited:
Associate
OP
Joined
10 Jan 2008
Posts
1,677
Location
Nottinghamshire
Hi FabienO,

Glad you're pleased with the progress I've made, which gives me a real boost.

A few things though:

Correct me if I'm wrong but if I place the entire site in a wrapper div, which I have done for the school site, doesn't that mean I'll loose some control over the background?

For example, I want the lighter horizontal bar that's inline with the content to automatically stretch down the page like the content bit does depending on how much text is in it. If I were to place it all in a wrapper div I wouldn't be able to do that to the background outside of the wrapper div.

Thanks for the links, superb.

I used a Footer-Text div in order to keep the text image, at the very bottom of the site, in-line with the side of the site when the site is being stretch but I'm sure there is an easy way.

I just thought that using absolute position would eradicate the need to have so many DIVS and I wouldn't need to create the illusion that the nav/content area of the site is indeed overlapping the header / footer because with using absolute and z-index I could achieve this.

Thanks for the link, bookmarked, and thanks for checking it in IE6!

I've included the DIV layout of the site so you can have a closer look. Apologies to admin if it's too big. I'll shrink it if needed.

There is a total of 11 DIVS used below:

design_div_layout.jpg


Could it be done using absoloute positioning? I was thinking for the Nav and Content area so I wouldn't need the nav container, main 2 and content bottom.

Thanks again,

RoEy
 
Last edited:
Associate
OP
Joined
10 Jan 2008
Posts
1,677
Location
Nottinghamshire
Hi Fab,

Still confused mate. Because if I place all the site in a wrapper div I won't be able to have full control of the background outsite of it, plus the middle section of the background won't increase / decrease with relation to the content area.

Plus I tried the code you provided earlier when I was searching for a solution and it didnt work for me.

RoEy

P.S. Just looked at the Complex design into CSS/HTML link you provided and you have to be a premium member to access it. :(
 
Last edited:
Soldato
Joined
15 Jul 2008
Posts
3,618
Location
Glasgow
Hi Fab,

Still confused mate. Because if I place all the site in a wrapper div I won't be able to have full control of the background outsite of it, plus the middle section of the background won't increase / decrease with relation to the content area.

Ill jump back in :p This is one downside of centering the whole site in a wrapper div.

Im building my portfolio just now and each section has a diferent BG which is 100% screen width.

My method (could be wrong :p):

<div id="home">

<div class="content">
<p>site content</p>
</div>

</div>

<div id="portfolio">

<div class="content">
<p>site content</p>
</div>

</div>

.content {
width: 850px;
margin-left: auto;
margin-right: auto;
}
#home {
position: relative;
width: 100%;
background-color: #333
}
#portfolio {
position: relative;
width: 100%;
background-color: #FFF
}

now you may need to modify this but you can ad each section's div then add a content class div then all your content inside it will be centered + the BG for that section will be 100% wide.

Hope this helps man :)
 
Associate
OP
Joined
10 Jan 2008
Posts
1,677
Location
Nottinghamshire
Tried both ways and still can't get it to work. It does work better when you apply the background as an image which means I can use less DIVS but it's still a problem overlapping the content area over the footer.

I'm still a noob at all of this so I think I'll move on and be happy with what Ive done so far. I'll never finish my book at this rate if I spend forever on this.

Really appreciate the help though and I bet you're both right, it's just me I think.

Cheers anyway,

RoEy
 
Associate
Joined
19 Jun 2010
Posts
1,695
Location
Southampton City Centre
@ RoEy

Code:
<html>
<head>

<style type="text/css">
body {background: #ffc573 url('http://www.fabieno.com/img/bodybg.jpg') repeat-x;}
div#wrapper { margin: 0 auto; width: 960px; }
div#banner { height: 200px; }
div#content { background-color: #fff; height: 600px; }
div#footer { position: relative; background-color: #A66100; margin-top: -80px; padding-top: 80px; height: 250px; z-index: -1;}
</style>

<title></title>
</head>
<body>
<div id="wrapper">
  <div id="top_title">Beatles</div>
  <div id="banner"></div>
  <div id="menu">Menu</div>
  <div id="content">Content</div>
</div>

<div id="footer"></div>

</body>
</html>

Can test it here if you wish to preview: http://www.jmarshall.com/easy/html/testbed.html
 
Back
Top Bottom