Getting inconsistent results with row/col in bootstrap. (Tribute Page)

Getting inconsistent results with row/col in bootstrap. (Tribute Page)
0.0 0

#1

Here is the code for my tribute page:

<body>
	<div class="container-fluid">
		<div class="jumbotron-fluid card-shadow" style="background-color: white">
			<h1 class="text-center" id="title">Christopher J. McCandless</h1>
			<div class="row">
				<div class="col-xs-8 col-xs-offset-2">
					<div class="thumbnail">
						<img src="http://www.jeffhead.com/images/ITW-07.jpg" class="img-responsive full-width" id="picture-main">
						<div class="caption text-center">
							<h3><em>Christopher McCandless standing in the Alaskan Wild</em></h3>
						</div>
					</div>
				</div>
			</div>
			<br>
			<br>
			<div id="content">
				<h2 class="text-center">Who is Alexander Supertramp?</h2>
				<div class="col-xs-8 col-xs-offset-2">
					<p>
						Christopher J. McCandless was an American hiker and itinerant traveler, who also went by the name "Alexander Supertramp". After graduating from college in 1990, McCandless traveled the United States, and eventually hitchhiked to Alaska in April 1992.There,
						he set out along an old mining road known as the Stampede Trail, with minimal supplies, hoping to live simply off the land. Almost four months later, McCandless' decomposing body, weighing only 30 kilograms (66 lb), was found by hunters in a converted
						bus used as a backcountry shelter along the Stampede Trail, on the eastern bank of the Sushana River. His cause of death was officially ruled to be starvation, although the exact cause remains the subject of some debate.
					</p>
				</div>
				<br>
				<br>
				<div class="row">
					<div class="col-xs-4 col-xs-offset-4">
						<a href="https://en.wikipedia.org/wiki/Christopher_McCandless"><button class="btn btn-primary btn-block card-shadow" id="learn-button"><span style="font-size: 250%">Learn More</span></button></a>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>

Here is the result, my intention is to have the paragraph text align with the image above:

Isn’t the whole point of using rows and columns to be able to easily align different elements? Am I using the rows and columns incorrectly or are they not the right tools for the job?


#2

Can you expand on what you mean by you want the text aligned with the image?

Do you mean you want the text to be as wide as the image is?
If so take a look at your CSS style sheet, you have on there
p {
padding: 2%;
padding-left: 15%;
padding-right: 15%;
}
that’s whats making your text look center aligned to the image above

If that’s not what you mean, that explain and I can take another look :slight_smile:

  • Nao

#3

Ah I see! I totally forgot about that code in the CSS section. That makes perfect sense, thank you.


#4

No problem.

Good Luck!

  • Nao