Copy link to clipboard
Copied
Good morning,
I created an alert for a website and am trying to figure out how to get the text to wrap automatically in Dreamweaver CC 2017 Bootstrap. Right now, the code continues on one line off the page. My code is below.
Thank you.
<div class="container-fluid"><br />
<div class="alert alert-danger">
<button type="button" class="btn btn-link"><strong>INCLEMENT WEATHER POLICY: TEMPLE ISRAEL OF SOUTH MERRICK FOLLOWS THE SAME POLICY AS BELLMORE MERRICK CENTRAL HIGH SCHOOL DISTRICT. CLICK HERE FOR UPDATED INFORMATION <a href="http://www.w3.org/">http://www.bellmore-merrick.k12.ny.us/</a></strong></button></div></div><br />
It would help if you wrap the Alert inside a row and a col -- the same as other Bootstrap elements.
<div class="container-fluid">
<div class="row">
<div class="col-sm-8 center-block">
<div class="alert alert-danger">
YOUR ALERT BOX CONTENT GOES HERE...
</div>
</div>
</div>
</div>
Nancy
Copy link to clipboard
Copied
It would help if you wrap the Alert inside a row and a col -- the same as other Bootstrap elements.
<div class="container-fluid">
<div class="row">
<div class="col-sm-8 center-block">
<div class="alert alert-danger">
YOUR ALERT BOX CONTENT GOES HERE...
</div>
</div>
</div>
</div>
Nancy
Copy link to clipboard
Copied
Nancy, if I wanted it across 12 columns and large text, would it be
<div class="col-lg-12 center-block">
Copy link to clipboard
Copied
Also in using your code above, the box is centered, however, the text still is on one line and goes off the page.
Thanks
Copy link to clipboard
Copied
The Bootstrap col- classes for mobile through desktop viewports are xs, sm, md & lg.
lg has no effect on text-size.
For bigger text, use heading tags <h1> or <h2> or <h3> inside your alert box.
Nancy
Copy link to clipboard
Copied
What about the second comment? I used the code and still the text goes "off the page".
<div class="container-fluid"><br />
<div class="row">
<div class="col-sm-12 center-block"> *I used 12 because I wanted the box and text to go across the entire width of the page.*
<div class="alert alert-danger">
<button type="button" class="btn btn-link"><strong>INCLEMENT WEATHER POLICY: TEMPLE ISRAEL OF SOUTH MERRICK FOLLOWS THE SAME POLICY AS BELLMORE MERRICK CENTRAL HIGH SCHOOL DISTRICT. CLICK HERE FOR UPDATED INFORMATION <a href="http://www.w3.org/">http://www.bellmore-merrick.k12.ny.us/</a></strong></button></div></div><br />
</div>
</div>
</div>
And I just saw something I have to change but that's in the <a href="...>.
Copy link to clipboard
Copied
Try this:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Bootstrap 3.3.6 Starter</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--Bootstrap-->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<style>
.center-block {float:none}
</style>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-sm-8 center-block">
<div class="alert alert-danger">
<h1>INCLEMENT WEATHER POLICY: </h1>
<h2>Temple Israel of South Merrick follows the same policy as Bellmore Merrick Central High School District.</h2>
<p><a class="btn btn-lg btn-danger" href="http://example.com">Updated Weather Info</a></p>
</div>
</div>
</div>
</div>
<!--latest jQuery-->
<script src="https://code.jquery.com/jquery-1.12.2.min.js" integrity="sha256-lZFHibXzMHo3GGeehn1hudTAP3Sc0uKXBXAzHX1sjtk=" crossorigin="anonymous"></script>
<!--Bootstrap-->
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</body>
</html>

Get ready! An upgraded Adobe Community experience is coming in January.
Learn more