Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Bootstrap 3 pixel design

Posted on 2013-12-28
10
464 Views
Last Modified: 2014-01-05
Hallo, can a make col 1 to be 220pix and 20 pix pading to the next colum?

The default is  235pix and 40 pix pading to next colum, or is the another whay to do it?


///Code
      <div class="container">
         
          <div class="row">
           <div class="col-md-3">1 </div>
           
             <div class="col-md-9">2</div>
          </div>

         
      </div>
0
Comment
Question by:MickeC
  • 5
  • 4
10 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39743512
Just make a custom css style sheet and load it after bootstrap.  Or if it is just for the page, load a <style> tag on the page below the bootstrap css.

<style>
.first{width:220px;padding:20px;}
</style>
<div class="row">
     <div class="col-md-3 first">1 </div>
           
     <div class="col-md-9">2</div>
</div>

Open in new window

0
 

Author Comment

by:MickeC
ID: 39743893
Thankaz..
Ok when a do that it dozent change for the smaller resolution it stay the same width, do i have to change it manualy for the smaller resolutions to?
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39743927
You asked, "can a make col 1 to be 220pix " and I gave you the answer http:#a39743512.  That will make the column the same width no matter what the viewport size.

>" it dozent change for the smaller resolution it stay the same width,"

Correct, you asked for the first column to be 220px wide and that is what we did.

You can see the result in this test link http://jsbin.com/EJImATUX/1/edit

Do you really mean you wan to change the width of the first column (or every column) for every screen size (xs,sm,md,lg)?  

With 12 columns, it should be easy enough to use the predefined sizes and they are based on percentage. When you start messing with the sizes in one spot, you may end up with issues in another.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:MickeC
ID: 39743981
Sorry about the confuzen, a whant to make a meny that is 220 pix and the md-3 colum is to big 278pix the md-2 colum is to small, how doa solve this, se attachment the top is the html and the bottom is the Photoshop file.
temp.png
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39744004
Your real issue is you are creating a static design for a responsive layout.  Instead of spending a lot of time to reengineer bootstrap, it would be faster to slightly change your layout.

Hopefully you are just  using your photoshop file as a visual layout tool and not actually slicing anything up.  No need.  With the exception of the photo of the blender and search icon, it looks like you can do everything in css.  

Your search box should be able to grow and shrink with the column you gave it.  You also need to account for what happens on the xs size screen.  You probably want to stack the rows like this.  http://jsbin.com/EJImATUX/2/

Notice that for the medium and above you have a wider left side and as the screen goes to small we give more space to the left and finally at extra small we make 2 rows by making the width the full 12.

This may  mean your image may need to be switched out from md to sm to xs as well so it still looks good.

  <div class="row">
   <div class="col-xs-12 col-sm-5 col-md-4">1111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 1111 </div>
           
     <div class="col-xs-12 col-sm-7 col-md-8">2222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 2222 2222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 22222222 2222</div>
</div>

Open in new window

0
 

Author Comment

by:MickeC
ID: 39744039
Thanks for the help, I now understand what you mean, and how I should think. Is not used to grid and bootstrap way of thinking ...
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39744113
Mike,

Thank you for the points.  Can you let me know why you did not rate this answer an "A"?  Maybe there is a mis understanding or I could have explained this better?
0
 

Author Comment

by:MickeC
ID: 39753285
Sorry course it was an A can a change the rating?
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39753787
Just click the Request Attention link and a mod will assist.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

860 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