| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Need some CSS/Table/ASP help
I finally got all the ASP pages I need working properly. Now I'm ready to tie them all together.
The problem I've run into is when I try to use CSS, I can't get the ASP page to display using #include or Server.Execute. So I then tried to use a table, which worked fine with Server.Execute but the next page goes into full screen, when I would like it to stay in the same cell as the first page. Tried _self, _parent, _top and it still opens full screen. I'm trying to avoid using frames, but I'm afraid that's the only way it will work. I'm wondering if I'm going in the wrong direction with my coding. Do I need to hard code the design into each ASP page in order for it to work? What I envision is banner, left-nav bar, main content (ASP pages) beneath banner and to the side of nav bar and a footer. Any help or points in the right direction would be appreciated. I've searched a couple hours on google and haven't found anything substantial that pertains to the above situation. |
|
#2
|
||||
|
||||
|
Please don't use tables for page layout
And paste your code here, I can get that CSS to be printed again. I trust you're using XHTML1.1? |
|
#3
|
|||
|
|||
|
This is the CSS
Code:
#container {
width: 1024px;
background-color: transparent;
margin: 0 auto 0 auto;
}
#banner {
width: 860px;
background-color: transparent;
display: block;
margin-left: auto;
margin-right: auto;
}
#leftbar {
width: 200px;
background-color: #cccccc;
float: left;
}
#mainbar {
margin-left: auto;
margin-right: auto;
background-color: transparent;
}
#rightbar {
width: 200px;
background-color: #cccccc;
float: right;
}
Content: Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Maintenance Officer Training</title> <link href="float.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="container"> <div id="banner"> <ul> <img src="images/maint_trng_banner.png" width="800" height="128"> </ul> </div> <div id="leftbar"> <ul> <% Server.Execute("navbar.asp") %> </ul> </div> <div id="rightbar"> <ul> </ul> </div> <div id="mainbar"> <p> <% Server.Execute("indiv_trng.asp") %> </p> </div> </div> </body> </html> Nav bar Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title></title> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="10"> <!-- left column --> <td width="20%" height="100%" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <p><tr><td><span class="offtrng"><a href="indiv_trng.asp">View Individual Training</a></span></td></tr></p> <p><tr><td><span class="offtrng">Search Classes Attended </span></td></tr></p> <p><tr><td><span class="offtrng"></span></td></tr></p> <p><tr><td><span class="offtrng"><a href="addrecord.asp">Add Record</a></span></td></tr></p> <p><tr><td><span class="offtrng"><a href="edit.asp">Edit Record</a></span></td></tr></p> <p><tr><td><span class="offtrng"><a href="delete_select.asp">Delete Record</a></span></td></tr></p> </table> </td> <!-- right column --> <td width="80%" valign="top"> </body> </html> I just need a point in the right direction... the code above works but when it goes to the next asp page, that page opens full screen. That's not what I want, I want it to open in the content area. Is that possible? Or do I need to code each ASP page to load the banner and navbar via CSS? Thanks. |
|
#4
|
||||
|
||||
|
Wahey, 1.0! Good lad! Should be 'Strict' though...
![]() Why are you using tables? You're not even using them properly. You have <tr>'s within <p>'s...? Why? And you close the <body> without ending the <td>,<tr> and <table>. |
|
#5
|
|||
|
|||
|
Well that page is a test and I have not finished coding it. I'm beginning to think that I'm going to have to hard code each ASP page to load the navbar and banner. Frames would work, but I know there has to be a way to do it because I have seen other pages work the way I described.
BTW, if I don't use tables the asp page loads below the navbar and not to the side like I want. |
|
#6
|
||||
|
||||
|
Erm...
Importing Navbar.asp into an existing page will also insert the <DTD> and other header and unique-only elements... the page wont validate and will confuse most browsers out there. Oh, and aim for XHTML1.1 rather than 1.0 Strict. |
|
#7
|
|||
|
|||
|
Want to thank everyone for their help. I decided to go a different route and went with horizontal menus. This solved the loading of my ASP pages and I hardcoded each page with the include file with the banner and navigation bar, so it works just the way I want it.
![]() |
![]() |
| Viewing: ASP Free Forums > Web Design > Web Layout > Need some CSS/Table/ASP help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|