Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Using Bootstrap.css

New Here ,
Feb 28, 2018 Feb 28, 2018

Copy link to clipboard

Copied

I am a student and working with Bootstrap for the first time.   The text for our class is from 2014 and the instructions for this week's assignment are for using fluid grid layout.  I have to figure out how to bridge the two and am wondering if anyone out there has experience with this.  My first question is when creating the bootstrap, do I attach the the two css files that I currently have created in my project?  DW asked me to overwrite a couple of things (which I now can't remember) and that makes me nervous.   Any advice would be greatly appreciated.

I have 3 things in my Sources menu - ALL Sources, boilerplate.css and su.styles.css.   I really want to understand if I am supposed to attach them to the bootstrap and if I do, will it mess up anything for the other parts of the project website.

I don't know what else to post, so if more info is needed to answer my questions please let me know.

Views

581
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 28, 2018 Feb 28, 2018

the way to swap from one method to an other is not just based on swapping CSS files. Most of the time the all CONTENT (text, images, medias...) is meshed in a structure (HTML) ... then classes, id... are added to this structure in order to be able to identify the elements and apply to them on the one hand a layout, but also a visual identity, and these two aspects of the model are related to the use of styles (CSS).


Not to mention that an interactive layer (JS) can also rely on these elements of

...

Votes

Translate
Community Expert ,
Feb 28, 2018 Feb 28, 2018

Copy link to clipboard

Copied

the way to swap from one method to an other is not just based on swapping CSS files. Most of the time the all CONTENT (text, images, medias...) is meshed in a structure (HTML) ... then classes, id... are added to this structure in order to be able to identify the elements and apply to them on the one hand a layout, but also a visual identity, and these two aspects of the model are related to the use of styles (CSS).


Not to mention that an interactive layer (JS) can also rely on these elements of identification (classes and ID). so before replacing them, one have to be sure that no ones rely on them.

CSS are applied at two levels... first for the layout (the one that has to be swap) and second for the visual aspect (colors, fonts, ornamentation..) ... changing tech (from fluid grid to bootstrap) should only affect the first one (structure)... but... there is a but... bootstrap is quite intrusive (unlike other frameworks), that is, it also provides a visual layer to all components.

of course it is quite possible to act on this visual layer, but it requires a minimum of skills that do not necessarily go hand in hand with the use of such a framework.

you say that the site was built using (at the layout level) a fluid grid layout ... having to switch to bootstrap, then consists in locating in the structure all the classes that are then present and used for the fluid grid, and adapt them with the one used by bootstrap.


but then the problem is going to be to make sure that the HTML structure makes it possible to apply components Bootstrap, which is not necessarily the case. (the nested div used for fluid grid are not the same than the ones used for bootstrap, idem on a component level (menu, image bloc and so on)...)

I think that in order to undertake such an operation, it is important to ask yourself a few questions, namely:

  • does this recasting operation come from an imposed exercise?
  • what is the overall volume of the site and are all pages based on the same model?
  • is there a template for this site?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 19, 2018 Mar 19, 2018

Copy link to clipboard

Copied

I have the page set up and published.  The page contains the required elements. But the background doesn't have any restraints, like the other pages.   I do have validation errors that I am afraid to touch.  I also have CSS errors.  The main thing though is that my bootstrap page doesn't look like the others.  Could you look at my published and tell me where to go to correct.  It is the Sand crab cafe page that I applied the bootstrap exercise too.  ...http://student.msubillings.edu/mis310/marlea.lipka/index.html

I am a student, so I am not prepping for a client.   Only a grade on the line.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 19, 2018 Mar 19, 2018

Copy link to clipboard

Copied

it looks like in the first page you use a surrounding master container <div class="gridContainer clearfix"> <div id="content" class="fluid"> and you don't use it in the cafe.html page...

(if you look this thread from a mailer... please visit my last answer... copy paste, doesn't accept multi crop in buffer... sorry)

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 01, 2018 Mar 01, 2018

Copy link to clipboard

Copied

As Birnou correctly said, the HTML structure in Bootstrap is very different from legacy Fluid Grid Layouts.   The old FGLayout code is not compatible with Bootstrap and vice versa.

Bootstrap uses a 12-box grid system inside a container and row.   In this example, 4 columns on desktops breaks to 2 columns on smaller devices and 1 column stacked vertically on mobile phones.  This is achieved through column classes for xs, sm, md & lg devices.

<!DOCTYPE html>

<html lang="en">

<head>

<title>Bootstrap Example</title>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

</head>

<body>

<div class="jumbotron text-center">

<h1>My First Bootstrap Page</h1>

<p>Resize this responsive page to see the effect!</p>

</div>

<div class="container">

<div class="row">

<div class="col-sm-6 col-lg-3">

<h3>Column 1</h3>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit...</p>

<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris...</p>

</div>

<div class="col-sm-6 col-lg-3">

<h3>Column 2</h3>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit...</p>

<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris...</p>

</div>

<div class="col-sm-6 col-lg-3">

<h3>Column 3</h3>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit...</p>

<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris...</p>

</div>

<div class="col-sm-6 col-lg-3">

<h3>Column 4</h3>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit...</p>

<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris...</p>

</div>

</div>

</div>

</body>

</html>

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 19, 2018 Mar 19, 2018

Copy link to clipboard

Copied

Could you look at my reply to Birnou   My bootstrap page has issues.  (Sand crab cafe) http://student.msubillings.edu/mis310/marlea.lipka/index.htmlhttp://student.msubillings.edu/mis310/marlea.lipka/index.html

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 19, 2018 Mar 19, 2018

Copy link to clipboard

Copied

First of all, this is NOT Bootstrap.   It's legacy Fluid Grid Layouts which I don't recommend using.   2 totally different frameworks with vastly different features --  Bootstrap being the better one.  I also don't understand why a course would make any mention of FGLayouts in a 2018 syllabus.   This is an old feature that should be allowed to die.

Below is a basic Bootstrap 4 layout. 

You can copy & paste the code below into a new, blank document and play with it in DW 2018.

<!doctype html>

<html lang="en">

<head>

<meta charset="utf-8">

<title>Bootstrap 4 Starter Page</title>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1">

<!--Bootstrap 4 CSS-->

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">

<style>

body {padding-top: 3.5rem}

/**placeholder image**/

.jumbotron {background: url(https://placeimg.com/1200/500/arch) no-repeat center center fixed;

background-size:cover;

}

.jumbotron > .container {background: rgba(0,0,0,0.5); padding: 3%; color:#FFF}

</style>

</head>

<body>

<nav class="navbar navbar-light navbar-expand-md bg-light justify-content-center fixed-top"> <a class="navbar-brand" href="#">Brand / Logo </a>

<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">

<span class="navbar-toggler-icon"></span>

</button>

<div class="collapse navbar-collapse" id="navbarsExampleDefault">

<ul class="navbar-nav mr-auto">

<li class="nav-item active"> <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> </li>

<li class="nav-item"><a class="nav-link" href="#">Menu 1</a></li>

<li class="nav-item"><a class="nav-link" href="#">Menu 2</a></li>

<li class="nav-item"><a class="nav-link" href="#">Menu 3</a></li>

<li class="nav-item"><a class="nav-link" href="#">Menu 4</a></li>

</ul>

</div>

</nav>

<main role="main">

<!-- Main jumbotron for a primary marketing message or call to action -->

<div class="jumbotron">

<div class="container">

<h1 class="display-3">Hello, world!</h1>

<p>This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.</p>

<p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more &raquo;</a></p>

</div>

</div>

<div class="container">

<!-- Example row of columns -->

<div class="row">

<div class="col-md-4">

<h2>Heading</h2>

<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>

<p><a class="btn btn-primary" href="#" role="button">View details &raquo;</a></p>

</div>

<div class="col-md-4">

<h2>Heading</h2>

<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>

<p><a class="btn btn-primary" href="#" role="button">View details &raquo;</a></p>

</div>

<div class="col-md-4">

<h2>Heading</h2>

<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>

<p><a class="btn btn-primary" href="#" role="button">View details &raquo;</a></p>

</div>

</div>

<hr>

</div>

<!-- /container -->

</main>

<footer class="container">

<p>&copy; Company 2017-2018</p>

</footer>

<!-- Bootstrap core JavaScript

Placed at the end of the document so tpages load faster -->

<!--latest jQuery Core-->

<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>

<!--Popper JS-->

<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>

<!--latest Bootstrap 4 JS-->

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>

</body>

</html>

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

LATEST

Hi,

Please refer to below bootstrap help documentation.

Design responsive websites using Bootstrap

Thanks

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines