Thread: CSS problem
View Single Post
Old 12-08-2007, 08:58 PM   #5 (permalink)
victorius
The Wanderer
 
victorius's Avatar
 
Join Date: Nov 2007
Location: Denmark
Posts: 21
Thanks: 4
victorius is on a distinguished road
Default ah, beaten to the punch

Oh, Wildhoney you were quicker than me.

Although probably great solution you've come up with there, it's my personal opinion that we don't need to use so many divs. (Tanax as well)

Also, using the id="" so much makes it (according to standards) impossible to have more than one of those blocks in the same document. The id is supposed to be unique in a document.

Although it will display correctly, the best practice is to only assign id to a specific item.

And this block you can repeat as you like for many posts.

Oh, and yet another thing. It's important for SEO to use headings

Here is a sample from my proposal. I use the standard tags as much as possible. Even in this case I would probably try to use less code, but I was trying to make it look exactly like Tanax's mockup.
Code:
<!-- A single post -->          
            <div class="post">            
                
                <!-- The title bar with graphics -->
                <div class="post-title"><p>New style</p></div>
                
                <!-- actual post contents -->
                <div class="post-content">
                    <!-- the admin panel -->                
                    <div class="admin-panel"><a href="#">Edit</a> <a href="#">Delete</a></div>                           
                    
                    <!-- Title: always use a heading tag as a title -->
                    <h2>New style</h2>
                    
                    <p>Been working on a new style for the website today, and I think that I've finally came up with a nice design. Please tell me what you think of it!</p>
                    
                    <p>Been working on a new style for the website today, and I think that I've finally came up with a nice design. Please tell me what you think of it!</p>
                    
                    <div class="admin-panel"><a href="#">Edit</a> <a href="#">Delete</a></div>
                                        
                    <p class="post-details">Updated 18:39 the 8th of December by <a href="#">Friiidiiish</a></p>
                    <p class="comments"><a href="#">Comments (13)</a></p>
                </div>
            </div>
        <!-- A single post -->
See the attached file for the whole thing.
Send a message via MSN to victorius
victorius is offline  
Reply With Quote