Laravel background color
14,075
Your page is not blue since you assign the color to a container on page. Change your css
style to
body{
background-color: lightblue;
}
You should also keep in mind, that total page layout is layouts/app.blade.php
, you can find parent container body
in it.
Related videos on Youtube
Author by
blastme
Updated on June 04, 2022Comments
-
blastme almost 2 years
I am trying to give my view page a background color but it keeps on only giving me 3/4 of the page light blue when I want everything. (see screenshot) Can anyone help me? Thanks a lot
Here is the css code that I am using: background.css
.container{ background-color: lightblue; }
view.blade.php
@extends('layouts.app') @section('content') <link href="{{ asset('css/background.css') }}" rel="stylesheet"> <div class="container"> <div class="row"> <div class="col-md-8 col-md-offset-2"> <div class="panel panel-default"> <div class="panel-heading">Dashboard</div> <div class="panel-body"> @if (session('status')) <div class="alert alert-success"> {{ session('status') }} </div> @endif You are logged in! </div> </div> </div> </div> <h1>Overview</h1> <table class="table table-bordered"> <tr> <th><strong><big>Name: </big></strong></th> <th><strong><big>Action: </big></strong></th> </tr> <td> <tr> @foreach($data as $value) <tr> <th><a href="{{route('user.show',['id'=>$value->pi_id])}}">{{$value->Name}}</a></th> <th><form action="{{ url('/home/'.$value->pi_id.'/delete') }}" method="get"> {{ csrf_field() }} <button type="submit">Delete</button> </form></th> </tr> @endforeach </div> @endsection
-
Minal Chauhan over 6 yearswhere is a screenshot?
-
blastme over 6 yearsJust added, forgot to put in @Minai Chauhan
-
Saurav Rastogi over 6 yearsPlease put the full HTML code (parsed one).
-
blastme over 6 years@SauravRastogi but this is my full code..
-
Saurav Rastogi over 6 years@blastme Where is the header & footer?
-
blastme over 6 years@SauravRastogi that is in another page, is that needed? If yes I will post it
-
psuresh over 6 years@blastme Right click on the page and inspect elements, go through each div and see associated CSS.
-
Saurav Rastogi over 6 years@blastme Do you need the full height of the page to blue or the width?
-
blastme over 6 years@SauravRastogi I want the whole page to be blue but for some reason it only stay until half way
-
shukshin.ivan over 6 yearsSo give the color to
body
, not to the container selector only. -
blastme over 6 yearsOh my god it worked thanks a lot, maybe you can put your answer below so that I can upvote you @shukshin.ivan
-
Harden Rahul over 6 yearsInstead of giving a background color to .container try to give this color to his parent element
-