MyBB Community Forums

Full Version: PSD to CSS.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Learn to code. All of ya. Tables are for displaying tabular data. They are generally faster at doing this than styling a div to do it. Divs are divisions of pages.

Quote:And well, if you have a fair knowledge of HTML/CSS, there's is no need for any CSS trickery or anything like that.


You may need a bit more knowledge than fair though. You should very rarely have to apply any CSS hacks...IE6's standards support is not too bad - it still supports most of CSS 2.

Quote:. I try and use the way that requires the least amount of CSS trickery (like absolute positioning and floating elements)

Absolute positioning has it's uses but not for layouts. If you are using absolute positioning in your layouts you are doing it wrong. Floating is not a trick at all and should be emloyed with every column based layout - if used correctly it results in far less code than tables or other CSS methods.

Quote:The problem is div isn't as set in stone as tables. While this is nice when developing things in the long run it's the not always the easiest to set up.

Should be much quicker and use much less code:

<div id="div">
<h2>Heading</h2>
<p>Paragraph</p>
</div>

#div{
width
height
float
background
}

Compared to:

<table id="table">
    <tr>
    <th>Heading</th>
    </tr> 
    <tr>
        <td><p>Paragraph</p></td>
    </tr>
</table>

#table, #table td{
border
}

#table th{
background
font-weight
}

#table td{
background
}

The point of CSS is to separate content from presentation. All of the content should be in your HTML file - with absolutely no presentational tags/attributes (<font>, <center>, height="" etc).

All the presentation stuff goes in the CSS.
Pages: 1 2 3