SolvedPrivate

Change css to remove extra spaces

Posted on 2015-02-15
10
23 Views
Last Modified: 2016-02-25
I think the issue is with panel-body class.

This page looks fine. No extra spaces between the textboxes

http://stagingbd.com/office-name-add-a-branch.html

This is the one I'm working on based on that page above. I'm plugging it to .Net MVC code but I have extra spaces between the textboxes

http://stagingbd.com/Branch_New.html
0
Comment
Question by:Camillia
  • 6
  • 4
10 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40611438
Your second example references 'localhost' for all the files which of course are not on My 'localhost' but yours.  That means we can't see what your CSS and scripts are doing.
0
 
LVL 7

Author Comment

by:Camillia
ID: 40611458
Looked at it. Let me change that. I'll post again
0
 
LVL 7

Author Comment

by:Camillia
ID: 40611483
Here, this is the one that's needs the spaces be removed. I played around with "panel-body" and "form-group" and it's this combination that causes the extra space. "form-group" comes from bootstrap so I don't want to change that. I know I can override it.

http://stagingbd.com/beadynew.html
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40611523
It looks like these two are your biggest problem.  The two of them combine for 45px of blank space.
.panel-body {
    padding: 15px;
}
.form-group {
    margin-bottom: 15px;
}

Open in new window

0
 
LVL 7

Author Comment

by:Camillia
ID: 40611536
Yeah, there has to be some padding...that's why I have   <div class="form-group panel-body">

Now, If I remove "panel-body" from the first textbox, it looks like this...the padding is totally removed.

The thing is, there's  <div class="panel-body">  as top level...that should do the padding but it's not.

one css class removed
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 7

Author Comment

by:Camillia
ID: 40611539
I think I can remove  class="form-group panel-body"   totally and it looks correct.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40611588
Probably.  I set the following to 1px in Firebug and it seems to work.
.form-horizontal .form-group {
    margin-left: 1px;
    margin-right: 1px;
}
.panel-body {
    padding: 1px;
}
.form-group {
    margin-bottom: 1px;
}

Open in new window

0
 
LVL 7

Author Comment

by:Camillia
ID: 40611595
I thought I shouldn't be changing bootstrap CSS tags directly. I should create news ones to override them. At least, that's what a CSS guy said that my previous job.

I can try what you have.
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40611614
Either method is fine.  You don't need to change them in 'bootstrap.css', just change them in that page in their own 'style' section that comes last after all the others and just before the </head> tag.
<style type="text/css">
<!--
.form-horizontal .form-group {
    margin-left: 1px;
    margin-right: 1px;
}
.panel-body {
    padding: 1px;
}
.form-group {
    margin-bottom: 1px;
}
 -->
</style>

Open in new window

0
 
LVL 7

Author Comment

by:Camillia
ID: 40611621
thanks,I'll try
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now