locked
Site.Master and modifying Bootstrap.css? RRS feed

  • Question

  • User-1793215261 posted

    Hello

    I need to modify the forms (Register.aspx and Logon.aspx) in the ASP.NET Identity template in order to conform to the rest of my site's theme, colour, and sizes (form field sizes, font sizes, etc). Site.Master and Bootstrap.css largely control the design of Register.aspx and Logon.aspx. I cannot remove Site.Master from the top of my aspx pages, for example

    <%@ Page Title="Register_test" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Register_test.aspx.vb" Inherits="WebFormsIdentity.Register_test" %>

    without receiving server 'control' errors. I do not want to lose the functionality of ASP.NET Identity (storing users in a database, hashing their passwords, etc), so I am stuck with Site.Master and its Bootstrap.css file with its 7000+ lines of CSS code).

    Furthermore, I can probably not replace Bootstrap.css (and its related CSS files) with my own CSS file in order to conform to the rest of my site's design without causing myself a headache somewhere downstream, so am I right in saying that the best way to proceed to is alter some of the properties in Bootstrap.css? Those properties I need to change are:

    form-horizontal, form-control, form-group, text-danger, col-md-2, col-md-2 control-label, and btn btn-default.

    Thanks!

    Thursday, April 4, 2019 12:13 PM

Answers

All replies

  • User475983607 posted

    Bootstrap has nothing absolutely nothing to do with Identity.   Can you explain the problem you are trying to solve?

    Thursday, April 4, 2019 1:05 PM
  • User-474980206 posted

    if your site is to using bootstrap, then I would not add it for two pages. It should be trivial to convert this page to your markup. first pass strip all bootstrap markup. then add your own 

    Thursday, April 4, 2019 2:23 PM
  • User283571144 posted

    Hi Bluenose,

    Furthermore, I can probably not replace Bootstrap.css (and its related CSS files) with my own CSS file in order to conform to the rest of my site's design without causing myself a headache somewhere downstream, so am I right in saying that the best way to proceed to is alter some of the properties in Bootstrap.css? Those properties I need to change are:

    form-horizontal, form-control, form-group, text-danger, col-md-2, col-md-2 control-label, and btn btn-default.

    As far as I know, bootstrap provides a site for user to customize Bootstrap's components, Less variables, and jQuery plugins. You could modify the style according to your own requirement.

    Link:https://getbootstrap.com/docs/3.4/customize/  

    form-control, form-group:

    https://getbootstrap.com/docs/3.4/customize/#forms 

     text-danger

    https://getbootstrap.com/docs/3.4/customize/#form-states-and-alerts

    col-md-2, col-md-2 control-label

    https://getbootstrap.com/docs/3.4/customize/#grid-system

    btn btn-default:

    https://getbootstrap.com/docs/3.4/customize/#buttons 

    Best Regards,

    Brando

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 5, 2019 5:50 AM
  • User-1793215261 posted

    Many thanks for those useful links!

    Friday, April 5, 2019 3:19 PM
  • User-1793215261 posted

    Of course, Bootstrap.css (and its associated CSS files) has everything to do with Identity - it is the layout architect and form designer behind Register.aspx and Login.aspx

    Regards.

    Friday, April 5, 2019 3:21 PM