PDA

View Full Version : Div tag, content position


rico1931
12-17-2008, 03:33 PM
Holiday Greetings everyone! http://images.devshed.com/faf/smilies/smile.gif

I wanted to know if anyone knew how to position content based on div tags. Let me try to explain, I have content and I want it to either render in the LeftNav or in the MainContent area based on what the user choses. Does anyone know how to do this without hardcoding it in?

I currently store the position of the content within a DB. So there is a field called Content_Loc for the location i.e LeftNav or MainContent. is there a way to state where you would like content being rendered in either place with out having to hard code it in the LeftNav div tag on the page?

Let me know if you need an example or more clarification

Thank you
-X

rico1931
12-17-2008, 07:21 PM
I sort of cheated before I saw your post here is what I have... its not the best code at all and plus i'm a noob and using dreamweaver to build the site but here is what I wrote.

<table border="0" cellpadding="1" cellspacing="1">
<tr> </tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT rsFacts.EOF))
%>
<tr>
<td>
<div id="<%=(rsFacts.Fields.Item("FACT_LOC").Value)%>">
<span class="%=(rsFacts.Fields.Item("FACT_ElmID").Value)%>">

<%=(rsFacts.Fields.Item("FACT_Content").Value)%>
</span>

<img src="..\site\<%=(rsFacts.Fields.Item("FACT_Content").Value)%>"
class="<%=(rsFacts.Fields.Item("FACT_ElmID").Value)%>" />
</div>
</td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsFacts.MoveNext()
Wend
%>
</table>
</div>
My DB has all the content for the site in one
table that manages look and feel of the content being displayed.
I'mtrying to make a self generating web page where users can
just input information into the DB via forms and the page
will render according to input they put in.
Think of it as a in-house content manager but not
fancy with the GUI. I'm only an Intern and still in school
learning Informatics so I know this isn't the best out there but hey it
keeps getting me paid and is 4 credits toward my Informatics
degree!