Strange blank space in the right of my page - CSS - html

From 2 hours I'm looking for what error is on my page because I have a huge blank space...the width is too big and I don't want to have that space. Could you help me to fix my code ?
Here is my website where you can check : https://andrei-my-codepen.000webhostapp.com/
I don't know if it's because of an unclosed tag, or from CSS. But, when I wanted to fix this problem, I saw that, at some divs with class row, if I cancel margin-left: -15px, that space disappear, maybe is because I have too much row class?

Use below code as using row as a child of class="reservation1" should resolve your problem.
<div class="reservation1">
<div class="row">
<div class="col-md-4">
<p class="menu-reservation">you want to stand here?</p>
</div>
<div class="col-sm-6 reservation-div">
<div class="button-reservation ">
<p class="reservation-text1 text-center">seat reservation</p>
<p class="reservation-text2 text-center">Reserve a place in "Good Food" restaurant</p>
</div>
</div>
</div>
</div>

Related

HTML: Paragraph text doesn't stack up to rows. (All the text is in one line and out of paragraph)

I'm using twitter-bootstrap grid system and you can see the problem right here.
The text which is supposed to be in the center keeps outgoing from the center to right side as you can see...
<div class="row mt-2">
<div class="col-3"></div>
<div class="col-6">
<div class="text-left">
<p class="d-0">
<span id="issuer_msg" style="white-space: pre-line">{{msg.message}}</span>
<br>
</p>
<div class="text-center">
<small class="text-primary font-weight-normal">{{msg.sent_time}}</small>
</div>
</div>
</div>
</div>
How can I fix the problem?
The problem is from your inline styles where you used "white-space:pre-line"
Try using "white-space:pre-wrap" instead
I think the problem is coming from your small tags. Wrap paragraph around it.

How to set padding Bootstrap when left element has float propery?

I have the following HTML code:
<div class="col-md-3 block">
<div class="col-md-4 photo">
<a target="_blank" href="https://www.facebook.com/app_scoped_user_id/1282701351808739/"><img src=""></a></div>
<div class="col-md-8"><h4><span style="font-weight: bold;">Gracie Huff</span></h4><p class="review-comment" style="line-height: 1.6;"><span>Oh my goodness! Your work is so precious and beautiful!!! I love what you do and I hope you continue to keep up the fabulous work!!! ❤❤</span></p>
Problem is that block col-md-4 has property float:left.
If text in block .col-md-8 is so long it comes to under block col-md-4 photo.
Sample here
So, how to fix this?
As solution I can set fixed height for element: div.photo
When using bootstrap col's you have space for a total of 12 inside a row.
Please take a look at the grid documentation. http://getbootstrap.com/css/#grid
So in your example 3 + 4 + 8 = 15 . So that's 3 too many. In my code example below i divided the page into 3 even columns. So you do 12/3 = 4 so you give each class col-md-4 . If you don't want even columns you can play with the numbers at the end. But never go above 12 or they will not fit into a single row.
Also the basic structure involves a container and a row.
If you want the container to be full-width you can add container-fluid instead of container to your top-level div.
<div class="container-fluid">
<div class="row">
<div class="col-md-4">
<a target="_blank" href="https://www.facebook.com/app_scoped_user_id/739844199505120/"><img src="https://fb-s-b-a.akamaihd.net/h-ak-xpf1/v/t1.0-1/p50x50/14724409_686756244813916_4119560930105375585_n.jpg?oh=0d295e97d3818a2ba788015d38385376&oe=590D81DC&__gda__=1494163569_54508491e4fd3d1197960c466dfee235"></a>
</div>
<div class="col-md-4">
<h4 class="strong"><strong>Anastasia Michelle Archuleta</strong></h4>
</div>
<div class="col-md-4">
<p class="review-comment" style="line-height: 1.6;">
<span>I can't stop looking at these cute creatures! I'm so in love with all of them! I'm saving up for one, what one is going to be a very hard decision that's for sure!</span>
</p>
</div>
</div>
</div>

Prblem with equal heights jquery

I have a div with id=group1port.
Inside this div are multiple divs, one being id group1porteq.
I am using the equal heights to make the div's the same height however, with what I have, it currently changes the heights of all the div's, when I only want it to effect the div group1porteq. I have tried ('#group1port div.group1porteq') but this doesn't work. I have also tried removing the "div" completely and that also doesn't work. Also have tried changing it to ('#group1porteq div') and then that just makes all the div's inside that div equal.
The "div class="portlet light bordered" id="group1porteq"" is the two div's i need to have equal height
I have div's that all have multiple div's inside, and I am trying to just get equal height for 1 div. Here is a sample of the script.
<script>
if($(window).width() > 800){
$('#group1port div').equalHeights();
}
</script>
Here is a sample of the code
<div class="row" id="group1port">
<div class="col-md-4 col-sm-4">
<div class="portlet light bordered" id="group1porteq">
<div class="portlet-title">
<div class="caption">
<i class="icon-bar-chart font-dark hide"></i>
<span class="caption-subject font-dark bold uppercase">Bulletin</span>
</div>
</div>
<div class="portlet-body">
text
</div>
</div>
</div>
<div class="col-md-4 col-sm-4">
<div class="portlet light bordered" id="group1porteq">
<div class="portlet-title">
<div class="caption">
<i class="icon-bar-chart font-dark hide"></i>
<span class="caption-subject font-dark bold uppercase">Bulletin</span>
</div>
</div>
<div class="portlet-body">
text
</div>
</div>
</div>
</div>
I'm not sure I fully understand what div's you're trying to find, but this find's both 'group1porteq' divs nested within the 'group1port' div.
$('#group1port').find('#group1porteq').each(function() {
// Do equal height stuff
});
I don't know what equalHeights(), but it sounds like your issues are all related to the selectors. You can find a full list of selector options here https://api.jquery.com/category/selectors/
You have a duplicate id: id="group1porteq" on two divs. You cannot have an id be the same on a page. Try changing it to a class as a first step. Can you add some CSS to this bit of code? it would seem that you are trying to break a table apart. Try adding "display: block" to the class: class="group1porteq" once you change that and see if it breaks the table model so you can get individual heights again.

Centering text with Bootstrap 2.3.1

From searching around, I know this question has been asked before and I just... don't understand what is going wrong here.
I have tried about a million different angles and just can't get my text to center.
If anyone has any idea what the deal is and would like to let me know, that would be great.
<div class="row-fluid text-center">
<h1 class="span12">Foobar's Contacts</h1>
</div>
Among other things, I already tried moving the text-center class to the h1 element.
EDIT: I was able to change it to this and center the header. Any drawbacks to this approach?
<div class="offset4 span4 text-center">
<h1 class="span8">Foobar's Contacts</h1>
</div>
Try putting <h1> within a <div> specifying the span. Something like
<div class="row-fluid">
<div class="span12 text-center">
<h1>name's Contacts</h1>
</div>
</div>
I don't really understand though if you are trying to center a text within a <div>, or the entire page. If you want your page to be centered use something like
<div class="container">
.
.
<div class="row-fluid">
<div class="span12 text-center">
<h1>name's Contacts</h1>
</div>
</div>
.
.
</div>
Hope it helps.

Elements not lining up until after turning CSS rule off and on again

I have a layout built using CSS display:table (inline, row, cell, etc). I'm doing local development on it with apache, and when I refresh the page, two of the div containers are incorrectly lined up. However, if I uncheck and re-check display:table-row, they correct themselves, and the page displays correctly.
http://jsfiddle.net/fNNKT/
You can see the HTML and CSS at the jsFiddle above. It's actually not working there either, so maybe I'm doing something wrong, and can use help with that.
<div class="cabinet-container">
<div class="mode-bar">
<div class="mode-bar-left">
<div class="mode-bar-item">logo</div>
<div class="mode-bar-item active">Dispense</div>
<div class="mode-bar-item">Inventory</div>
</div>
<div class="mode-bar-right schedule">
<div class="mode-bar-item">Sign-Out</div>
</div>
</div>
<div class="table"></div>
<div class="left-container"></div>
<div class="center-container">
<div class="search-container">
<div class="table-cell">
<div class="search-field"></div>
</div>
</div>
<div class="nav-button-center-container">
<div class="table-cell">
</div>
</div>
<div class="list">
<div class="table-cell">
<div class="list-item-center-container"></div>
<div class="list-item-center-container"></div>
<div class="list-item-center-container-partial"></div>
</div>
</div>
<div class="nav-button-center-container-down-active">
<div class="table-cell"></div>
</div>
</div>
<div class="footer">
<div class="button-group table-border-5">
<div class="button-secondary">Dispense Non-Drug</div>
<div class="button-secondary">Sort By: Last Name</div>
</div>
<div class="button-group-right table-border-5">
<div class="button-primary">New Clinical Order</div>
</div>
</div>
</div>​
Is your question related to .mode-bar-left and .mode-bar-right wrapping onto two lines? If so, the problem relates to whitespace. Think of two images displayed inline, side by side. If there's whitespace between the tags in the code, there will be whitespace displayed in the browser.
Solution #1:
Take your logic one level higher up in the DOM. Change the display value for both mode-bar elements to table-cell (instead of the current inline-table). Then change the .mode-bar-item elements to display: inline-block (instead of table-cell).
Solution #2:
A faster, less elegant solution is to add float: left to .mode-bar-left.
On the topic of elegance, I strongly recommend that you consider some more semantically meaningful tags than just div. For example, .mode-bar-left is clearly a list (ul perhaps?) and the .mode-bar-item elements are clearly list items (li).
Are you using any javascript/jQuery? On a recent project of my own, I was having a similar issue and all I had to do was move my custom lightbox script from the to right before the tag, and it seemed to fix the issue. Sometimes javascript can be wonky like that. I don't understand why, but that's the way it is.