Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 29th, 2009, 05:13 PM
Friend of Wrox
Points: 546, Level: 8
Points: 546, Level: 8 Points: 546, Level: 8 Points: 546, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2009
Posts: 105
Thanks: 3
Thanked 20 Times in 19 Posts
Default

yevi,

You are not alone finding CSS difficult. I too have spent hours trying to bend it to my will.

I'm glad you liked the colored border trick, I'd often be lost without it. Another tip; when using MJT's layouts often some of the divs are placed way to the left or right and when you add another set of nested divs you won't see them, because they are off screen. you will need to make sure to set the appropriate left or right offset or margin values to move things back on screen. In other instances I've had divs with no height so nothing will appear until a height is specified. It is much like herding cats, difficult to do and you may not get what you expect just take your time and play with the numbers to see what they do and you will eventually get what you want.

I've read 3 or 4 CSS books and all of them only covered the basics and didn't get into the complex interactions of nested div layouts.

Enjoy.


Steve
 
Old March 30th, 2009, 10:02 AM
Authorized User
 
Join Date: Mar 2009
Posts: 75
Thanks: 16
Thanked 1 Time in 1 Post
Default

If I want to modify the Admin pages by removing the right column, what will be the best method?

To create another master page having the same header,footer and only 2 columns and then define this masterpage to all admin pages.

To use nested master pages?

Or maybe something else?
 
Old March 30th, 2009, 01:38 PM
Friend of Wrox
Points: 546, Level: 8
Points: 546, Level: 8 Points: 546, Level: 8 Points: 546, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2009
Posts: 105
Thanks: 3
Thanked 20 Times in 19 Posts
Default

yevi,

I can't tell you the best way since I haven't tried doing this yet. I do know that you will need a different master page as well as CSS pages(s), since the CSS is what is actually defining the columns and their widths.

Whether you can use nested master pages or not I could n'ot say.


Steve
 
Old March 30th, 2009, 03:27 PM
Authorized User
 
Join Date: Mar 2009
Posts: 75
Thanks: 16
Thanked 1 Time in 1 Post
Default

Sure thing.

I want to create a new layout for admin pages because,
first i need more space for gridviews (I've added additional columns to the table)
and second i don't think there is a need to display information on both left and right columns (I'll put an admin menu inside left column).

Update:
The problem is that I am having is organizing all this with themes and css files.
For admin master page I need to preserve the original theme that includes settings for header, footer, content's fon't and color and etc.
And i need new css for new layout.

I have trouble organizing all that.

Last edited by yevi; March 30th, 2009 at 03:41 PM..
 
Old March 30th, 2009, 04:25 PM
Friend of Wrox
Points: 546, Level: 8
Points: 546, Level: 8 Points: 546, Level: 8 Points: 546, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2009
Posts: 105
Thanks: 3
Thanked 20 Times in 19 Posts
Default

yevi,

The page specifies the master page it uses, the masterpage can specify the CSS that it uses. Following this logic it should not be difficult to set up a specific master page and CSS file for use with the admin pages. Setting the CSS at the master page level would not allow you to change themes, but that is probably not a requirement for admin maintenance; if it is, you could probably clone the existing theme switching and modify it for the admin use.

As I said, I haven't traveld this path, but that's the logic train I'd use if/when I do.


Steve
 
Old March 30th, 2009, 05:01 PM
Authorized User
 
Join Date: Mar 2009
Posts: 75
Thanks: 16
Thanked 1 Time in 1 Post
Default

Well I need to set this logic straight.

If I decide to use 2 master pages, one regular with 3 columns and another for admin part with 2 columns.
I want both of them to share same theme look: header,footer fonts.
As I see it, this will require me to remove the layout parts from default.css
(in both template folders) because those master pages don't share the same layout but do share other css settings.

After that I should assign each css layout file individually to each master page.

This brings me to a question: is it possible to still place the layout css's to a theme folder, but load the needed css to it's compatible master page?
(As I understand all css files that inside theme folder are applied )
 
Old March 30th, 2009, 05:31 PM
Friend of Wrox
Points: 546, Level: 8
Points: 546, Level: 8 Points: 546, Level: 8 Points: 546, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2009
Posts: 105
Thanks: 3
Thanked 20 Times in 19 Posts
Default

yevi,

Thanks for flogging this, it makes me think about it and go back and look at my resources. I am not an expert in this area so I may be mistaken, but here goes.

First, CSS files can include a reference to include another CSS file, off-hand I don't remember the exact syntax for this. A web page can also reference multiple CSS files; but the cascading part will mean that the last set attribute will be what is displayed in either case. This means you could have 2-column and three-column CSS layouts and each of these could include refrences to another CSS file with layouts for common header and footer.

Themes, as a concept can include CSS, skins and images. I believe that all skin files in a theme are applied, but that CSS files have to be specified to be used, I think and may be wrong. Images used by CSS files are relative to the CSS file. So, to me, and I could be wrong, you could place your CSS outside of the default theme structure and as long as the images were referred to relative to the CSS file AND you weren't using skins, then you could do pretty much anything you want regarding CSS file location placement.

While CSS file includes, either images or other CSS files, need to be relative to the calling CSS file, master pages can include or call files from anywhere, typically relative to the root of the web site(~/). So a master page could call ~/app_theme/mytheme/commonheaderfooter.css and a second call to ~/admin/mytwocolumn.css.

This is all theoretical to me at this point. I can blue sky with the best of them in theory it should work. But as some wise person once said, "In theory there is no difference between practice and theory, but in practice there is."


Good luck

Steve
 
Old February 21st, 2010, 04:37 PM
Registered User
 
Join Date: Feb 2010
Posts: 2
Thanks: 5
Thanked 2 Times in 2 Posts
Default

I was able to solve this problem by adding the following line:

width:100%;

to the "#centercolcontent"
element in the default.css file for the TemplateMonster theme.

Hope this helps someone...
The Following User Says Thank You to RexSr For This Useful Post:
jsymons (August 26th, 2010)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Css layout not work well in Firefox kumiko CSS Cascading Style Sheets 0 March 31st, 2008 10:27 AM
CSS Layout DeadMeatGF CSS Cascading Style Sheets 2 November 5th, 2005 03:23 PM
Is CSS the best for making website layout?? DSteven CSS Cascading Style Sheets 3 August 23rd, 2005 05:45 AM
CSS layout issue Groundhog1248 CSS Cascading Style Sheets 1 March 2nd, 2005 09:13 AM
CSS Layout Divs Truce77 PHP How-To 2 March 29th, 2004 07:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.