1,105,281 Community Members

alternative to frames with css??

Member Avatar
Pankti Desai
Newbie Poster
2 posts since Jan 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I am looking for a way to achieve the layout shown below using CSS or any other method that can accommodate the design and implementation. The "top" portion is a fixed area. The "left" area will be a list of text links that target to the "main" area.To be more specific, a list of links to profiles will be in the "left" area and I want the associated profile to show in the "main" area.
I can do it with frames, but since it is not the best way or is not supported by html 5 i want some other alternative for this.Any ideas?

----------------------------------------------------
| top |
----------------------------------------------------
| | |
| | |
| | |
| | |
| left | main |
| | |
| | |
| | |
| | |
----------------------------------------------------

Member Avatar
Philippe.Lahaie
Posting Whiz
376 posts since Oct 2007
Reputation Points: 42 [?]
Q&As Helped to Solve: 60 [?]
Skill Endorsements: 9 [?]
 
0
 

Are you just asking about the layout structure or how to implement the dynamic side of the main section?

the layout is pretty easy , simply use a structure of divs, the top section could be from the page itself or if you are using a master page then it'd be best implemented there. then for the rest of the page in the contentholder I would use a big div for the whole content, then 2 divs side by side for the columns.

If you're asking about how to add the content then I personally use ASP.NET and to achieve this i would use a Repeater (assuming that you are pulling the data from a database) for the list on the left : get the profile IDs from the database, store them in a dataset, asign the dataset to the datasource of your repeater, have each item link to the same page with the profile ID as a querystring argument.

Use the QueryString to get the id of the profile you want to load and use it in the code behind to build your request (or even better use a stored procedure) to fill a dataset, use said dataset to fill the profile on the right side of the page.

short repeater sample :

<asp:Repeater ID="repeat_catLinks" runat="server">
    <ItemTemplate>
        <a href="#<%#DataBinder.Eval(Container.DataItem, "Nom_Type") %>" ><%#DataBinder.Eval(Container.DataItem, "Nom_Type")%></a>
    </ItemTemplate>
    <SeparatorTemplate> | </SeparatorTemplate>
</asp:Repeater>
Dim ds As DataSet
Dim commande As SqlCommand
Dim da As SqlDataAdapter

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim user As Utilisateur = CType(Session("User"), Utilisateur)
    If Not user.Confirmed Then
        Response.Redirect("/Becs/Login/Confirmation.aspx?user=" & user.Username & "&" & "conNum=" & user.ConfirmationNumber)
    End If
    If Not IsPostBack Then
        commande = New SqlCommand("sp_GetTypes", Application("Connection"))
        commande.CommandType = Data.CommandType.StoredProcedure
        da = New SqlDataAdapter(commande)
        ds = New DataSet()
        da.Fill(ds)

        repeat_categories.DataSource = ds
        repeat_catLinks.DataSource = ds
        repeat_categories.DataBind()
        repeat_catLinks.DataBind()
    End If
End Sub
You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: