|
-
How do I code this? (CSS/ASPX)
Here is my website:
http://www.richardmccord.com
Here is how the page is supposed to look right now. (hosted elsewhere)
http://www.sidinginc.com/website
(Don't mind the aesthetics. The colors are so I can see the code working for now)
Anyhow, I can't seem to be able to utilize external CSS at all. I changed the page to an .ASPX file... but I don't know anything about aspx so no big help there. Does aspx use a different funtion for Include?
CASE: Antec P180 | CPU: Intel Core 2 Duo Extreme X6800 | M/B: BFG 680i SLI Motherboard (BIOS P26)
Memory: Corsair Dominator DDR800 (2 x 1 Gig) Video: BFG Nvidia 8800 GTX | HD: 150 Gig Raptor
Sound: On-board for Ventrillo, X-FI Gamer for games | Monitor: DELL 2407WFP
-
In ASP.NET, you would typically handle this through the use of Themes. You would place a stylesheet within the App_Themes/YourStyle folder of your project.
Then, you would either add this as a property to individual pages or via the "pages" section of the Web.config file.
For example:
Code:
<pages theme="Default">
This code in the Web.config file would utilize stylesheets you've placed in App_Themes/Default on each page of your project.
Alternatively, you could always do a style declaration in the main HTML head section of the page:
Code:
<head>
<style type="text/css">
<!--
/* Styles go here */
-->
</style>
</head>
The disadvantage here, obviously, is that your styles will not be centrally managed. If you use the same styles on every page and wish to update something, you would have to update it on every page.
-
Question:
Can it only be an "apply" function like using CSS to define color parameters, etc... or
can it be used in the method I have done at the "working" site where my webpages work
like Lego blocks?
CASE: Antec P180 | CPU: Intel Core 2 Duo Extreme X6800 | M/B: BFG 680i SLI Motherboard (BIOS P26)
Memory: Corsair Dominator DDR800 (2 x 1 Gig) Video: BFG Nvidia 8800 GTX | HD: 150 Gig Raptor
Sound: On-board for Ventrillo, X-FI Gamer for games | Monitor: DELL 2407WFP
-
If I'm understanding your question correctly, you're asking if you can perform layout functions in the CSS (i.e. through div elements). If that is your question, then yes -- you can accomplish that through either method I described above.
Again, I would try to pursue a route of linking / importing a stylesheet or of applying a theme (in the ASP.NET world). You'll thank yourself when you have to update something.
-
"Importing" is what I'm trying to do here.
If you go to: http://www.sidinginc.com/website
You'll see what the site should look like. The actual code is:
____________________________________________________________ ____
<body>
<!-- START Page -->
<div id="wrapper">
<!-- START Menu -->
<!--#include file="code/Main/MainMenu.inc" -->
<!-- END Menu -->
<div id="background">
<!-- START Body -->
<div id="bodywrapper">
<!-- START Chapters -->
<!--#include file="code/Main/NavMain.inc" -->
<!-- END Chapters -->
<!-- START content -->
<!--#include file="code/Main/ContentMain.inc" -->
<!-- END content -->
</div>
<!-- END BODY -->
</div>
</div>
<!-- END page -->
</body>
</html>
__________________________________________________________
You can't see that with View Source because it actually puts the code in the page. The
point is, my design is a Lego Format. Each element of the page has it's own .INC file that
gets called in the location of the page that it's needed. Thus, the vista-style menu
across the top gets called first, then the background, then the chapter section and
lastly the main content section.
On the Officelive hosting site, this method doesn't work. However, the site does seem
to support ASPX so I need to find out how to accomplish this with ASPX coding. I'm not
having a whole lot of luck with google searches to figure it out.
Last edited by Nightlord; 10-07-2009 at 07:05 PM.
CASE: Antec P180 | CPU: Intel Core 2 Duo Extreme X6800 | M/B: BFG 680i SLI Motherboard (BIOS P26)
Memory: Corsair Dominator DDR800 (2 x 1 Gig) Video: BFG Nvidia 8800 GTX | HD: 150 Gig Raptor
Sound: On-board for Ventrillo, X-FI Gamer for games | Monitor: DELL 2407WFP
-
Are you sure your host supports SSI (Server Side Includes). If it doesn't, then you're not going to be able to include as you are at sidinginc.com.
You can accomplish something similar in ASP.NET by making user controls and registering them on your main ASPX page.
For instance, you might have MainMenu.ascx (a web user control), which contains all the relevant mark-up for your main menu. Then you would register this as a user control on Default.aspx.
Code:
<%@ Register Src="MainMenu.ascx" TagPrefix="uc" TagName="MainMenu" %>
Then, to use the control on your page:
Code:
<uc:MainMenu ID="ucMainMenu" runat="server"></uc:MainMenu>
This isn't really the best way to use user controls, but it can serve that purpose. You'd probably be better off developing your site in Visual Studio and setting up a Master page to centralize all your core layout modifications.
-
Damn, another program to use. hehe
I'll see what I can do. Thanks for the info.
CASE: Antec P180 | CPU: Intel Core 2 Duo Extreme X6800 | M/B: BFG 680i SLI Motherboard (BIOS P26)
Memory: Corsair Dominator DDR800 (2 x 1 Gig) Video: BFG Nvidia 8800 GTX | HD: 150 Gig Raptor
Sound: On-board for Ventrillo, X-FI Gamer for games | Monitor: DELL 2407WFP
-
Ok, I tried it. I got the same error:
"An error occurred during the processing of . The referenced file '/code/Main/MainMenu.ascx' is not allowed on this page. "
CASE: Antec P180 | CPU: Intel Core 2 Duo Extreme X6800 | M/B: BFG 680i SLI Motherboard (BIOS P26)
Memory: Corsair Dominator DDR800 (2 x 1 Gig) Video: BFG Nvidia 8800 GTX | HD: 150 Gig Raptor
Sound: On-board for Ventrillo, X-FI Gamer for games | Monitor: DELL 2407WFP
-
When I put all the CSS in the page, it works fine.
Sucks I can't use my Lego plan.
CASE: Antec P180 | CPU: Intel Core 2 Duo Extreme X6800 | M/B: BFG 680i SLI Motherboard (BIOS P26)
Memory: Corsair Dominator DDR800 (2 x 1 Gig) Video: BFG Nvidia 8800 GTX | HD: 150 Gig Raptor
Sound: On-board for Ventrillo, X-FI Gamer for games | Monitor: DELL 2407WFP
-
I'm not familiar enough with Small Business Server (or your particular configuration) to help you much beyond that, but there certainly appears to be some limitations.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|