Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB 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 June 22nd, 2014, 12:02 AM
Authorized User
 
Join Date: Jun 2014
Posts: 16
Thanks: 7
Thanked 0 Times in 0 Posts
Default Chapter 3 - CSS Formatting

Hello everyone,

1. CSS as seperate files (recommended) - Master can reference these files to the browser with
correct styles. It also lower bandwidth with browser using the cached copy.


2. CSS as small Snippets (used cautiously) Can be embedded in the master file.

a. Under what circumtances do we need to place the the CSS directly in the master knowing
the advantages of CSS as a seperate file? What is the common practise?

Thank you.

Cheers
Mohamad
 
Old June 22nd, 2014, 02:54 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Since a master page defines the looks of all pages that use that master there really isn't a need for embedded styles there as you might as well put it in an external CSS file. You typically use an embedded style in a content page to override the default styles on a page by page basis.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
mohamad (June 22nd, 2014)
 
Old June 22nd, 2014, 10:06 PM
Authorized User
 
Join Date: Jun 2014
Posts: 16
Thanks: 7
Thanked 0 Times in 0 Posts
Default

Thanks Imar,

I got it, only use embedded CSS to change the overall default setting on a page by page basis.


>>>Since a master page defines the looks of all pages that use that master(CSS) there really isn't

Above line should be CSS instead of master, am I right?

Cheers,
Mohamad

Last edited by mohamad; June 22nd, 2014 at 10:13 PM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble formatting divs using CSS float command Truck35 CSS Cascading Style Sheets 3 February 1st, 2018 07:33 AM
Formatting CSS to center Monochrome CSS SamuelMSr BOOK: Beginning ASP.NET 4 : in C# and VB 2 September 20th, 2011 03:50 AM
Css formatting problem beetle_jaipur CSS Cascading Style Sheets 2 June 5th, 2009 07:16 AM
Formatting php with css Hylsan Pro PHP 3 December 25th, 2006 07:16 AM
CSS formatting LoneStar1 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 3 April 10th, 2006 09:16 AM





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