Jump to content

Question regarding CSS/HTML

Go to solution Solved by EG!,
On 28-11-2017 at 12:01 PM, RockiLocky said:

But I have a problem(Using Bootstrap):

You'll have to override some bootstrap css which has premade css.

Try setting the margin-left and/or the padding-left of the "center-block" or "container-fluid" to 0.

 

If it does't override the bootstrap there is another ugly way to move blocks with margin-left:-10px; for instance or margin-left:0 !important;

I don't advise the later two though.

Hey guys, I am trying to work with some websides and did some costum pictures and got some from google. Now to test and get an kinda good looking webside up I am currently trying to make that ;D.

 

But I have a problem(Using Bootstrap):

I do have automatic margin to the left and right when using bootstrap. Under it the row/col and using a background img so I can put buttons in front of it :D. But sadly it is not working out rn and I dont know what to do. Hopefully someone can help me out.

 

Code:

<!DOCTYPE html>
<html>
<head>
	<title>Fermani</title>
	<link rel="shortcut icon" href="img/favicon.ico">
	<link rel="stylesheet" href="styles/main.css">
	<link rel="stylesheet" href="styles/side.css">
</head>
	<body>
		<div class="container-fluid">
			<div class="row">
				<div class="col-sm-12 fermaniLogo" style="background-color:#1a1a18;">
				<img class="center-block" src="img/fermani.png">
				</div>
    		</div>
    		<div clas="row">
    			<div class="col-sm-12 homepage" style="background-image: url('img/test2.png');">
    				<!---->
			</div>
    		</div>
		</div>
		
    <script src="scripts/bootstrap.js"></script>
  	<script src="scripts/bootstrap.min.js"></script>
	</body>
</html>
.fermaniLogo{
  padding-top:10px;
  padding-bottom:30px;
}

.homepage{
  padding-top:500px;
  padding-bottom:0px;
  margin-left: auto;
  margin-right: auto;
}

body{
	/*background-color: #1a1a18;*/
}

image.png.5bc8ed150cf17ab420d097b4125d6a92.png

 

 

 

 

With regards Rocki

Link to comment
https://linustechtips.com/topic/866317-question-regarding-csshtml/
Share on other sites

Link to post
Share on other sites

On 28-11-2017 at 12:01 PM, RockiLocky said:

But I have a problem(Using Bootstrap):

You'll have to override some bootstrap css which has premade css.

Try setting the margin-left and/or the padding-left of the "center-block" or "container-fluid" to 0.

 

If it does't override the bootstrap there is another ugly way to move blocks with margin-left:-10px; for instance or margin-left:0 !important;

I don't advise the later two though.

Desktop

CPUi5-6600K MotherboardGigabyte GA-Z170-HD3P CPU Cooler: Thermalright True Spirit 120M Black/white RAM: Corsair Vengeance LPX 16 GB DDR4 2400Mhz GPU: Gigabyte 1070 HDDs: 2 x Seagate Barracuda 2TB 7200 RPM  SSDSamsung EVO 850 500GB PSU: Coolermaster 550W 80+ Gold Case: NZXT S340 (White) with a white led strip ;)

Laptops

Dell 7577

CPUi7 7700HQ RAM: 16 GB DDR4 2400Mhz GPU: GTX1060 Max-q HDD: 1TB 5400 RPM  SSDNVMe 512GB SCREEN: 4k IPS 15.6"

Macbook pro 2018

CPUi7 RAM: 16 GB DDR4 2400Mhz GPU: Radeon Pro 555X 4GB Storage256GB SCREEN: 15"

Link to post
Share on other sites

On 1.12.2017 at 9:05 AM, EG! said:

You'll have to override some bootstrap css which has premade css.

Try setting the margin-left and/or the padding-left of the "center-block" or "container-fluid" to 0.

 

If it does't override the bootstrap there is another ugly way to move blocks with margin-left:-10px; for instance or margin-left:0 !important;

I don't advise the later two though.

Thanks for answering sry I am so late didnt check forums for a while because I found a way around it ;D

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×