Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Website logo without navigation bar bootstrap

I am curently making a website in which I dont want to have a navigation bar, but I want my logo to be on the top left corner. When I join from a mobile device I want it to be on the middle above one box. See the code below...

This is what I have made and it's almost done but I'm confused about how the grid system is working. Check out my code:

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=yes"/>

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">

    <meta name="description" content="">
    <meta name="author" content="">
    <title>Testing Login</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <!-- Bootstrap Core CSS -->

<style>
   /* CSS used here will be applied after bootstrap.css */
html{
  height:100%;
  min-height:100%;
}

body { 
 background: url('assets/img/4777.jpg') no-repeat center center fixed; 
 -webkit-background-size: cover;
 -moz-background-size: cover;
 -o-background-size: cover;
 background-size: cover;
min-height:100%;

}

.panel-default {
 opacity: 0.95;
 margin-top:50px;

}
.form-group.last {
 margin-bottom:0px;
}



    </style>

    <link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>

<div class="container">
    <div class="row">
<div class="col-md-4 col-md-offset-1">
<img src="assets/img/tei.png" class="img-responsive" alt="Responsive image">
</div>
        <div class="col-md-4 col-md-offset-4">
            <div class="panel panel-default">
                <div class="panel-heading"> <strong class="">Σύνδεση στην πλατφόρμα Εργαστηρίων</strong>

                </div>
                <div class="panel-body">
                    <form class="form-horizontal" role="form">
                        <div class="form-group">
                            <label for="onoma-xristi" class="col-sm-3 control-label">Όνομα Χρήστη</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" id="onoma-xristi" placeholder="" required="">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="kwdikos-xristi" class="col-sm-3 control-label">Κωδικός</label>
                            <div class="col-sm-9">
                                <input type="password" class="form-control" id="kwdikos-xristi" placeholder="" required="">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-3 col-sm-9">
                                <div class="checkbox">
                                    <label class="">
                                        <input type="checkbox" class="">Να με θυμάσαι</label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group last">
                            <div class="col-sm-offset-3 col-sm-9">
                                <button type="submit" class="btn btn-success btn-sm">Σύνδεση</button>

                            </div>
                        </div>
                    </form>
                </div>

                </div>
            </div>
        </div>
    </div>
</div>




<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>


</body>

</html>

Website preview

like image 826
Konstantinos Natsios Avatar asked Dec 05 '25 03:12

Konstantinos Natsios


1 Answers

top left corner

Change your html to

<div id="logo-container" class="col-md-4 col-md-offset-1">
    <img src="assets/img/tei.png" class="img-responsive" alt="Responsive image">
</div>
<div class="container">
    <div class="row">

centered image on resize

Add this to the CSS:

@media all and (max-width: 768px){ 
    #logo-container{
        text-align:center;
    }
    #logo-container .img-responsive{
       display:inline !important;
    }
    
}

And it should work.

like image 191
Baruch Avatar answered Dec 08 '25 10:12

Baruch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!