logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 08-20-2007, 05:22 PM   #1
m1a2x3x7
m1a2x3x7's Avatar
 
Join Date: Mar 2007
Posts: 297
Default PHP CSS W3.org

I have a blog and on the main page of my site off to the side i have my most recent post. I use a loop to display the blogs. I display 5 blogs total on the page and each blog has 3 items date, title, blog each in different div tags. The problem Im having is validating my HTML since w3 validation doesnt like you to have the same id for 2 divs the only way ive come up with an idea is to copy and past the div tag css and give it a name 1-5 then use a loop to place the number at the end of a div.

so

date 1 gets id 1
date 2 gets id 2
date 3 gets id 3 ect.

and the same for title and blog.

or is there another way?

also

i dont want the entire blog to be displayed. Im using longtext in my database for the blog but is there a query i can do that will only display say 5 or so words. Just supposed to be a teaser.

Thanks
m1a2x3x7 is offline   Reply With Quote
Old 08-20-2007, 07:01 PM   #2
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

Unless those ID's needs different CSS, just replace the ID with a CSS class.

Old HTML: <div id="something">
Old CSS: #something {}
New HTML <div class="something">
New CSS: .something {}
domedia is offline   Reply With Quote
Old 08-20-2007, 07:09 PM   #3
m1a2x3x7
m1a2x3x7's Avatar
 
Join Date: Mar 2007
Posts: 297
Default

alright alright ill try jeez

thanks man
m1a2x3x7 is offline   Reply With Quote
Old 08-20-2007, 08:09 PM   #4
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

oops some duplicate posts there, sorry I'll remove them
domedia is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:23 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com