logo
down
shadow

Stuff is not centering in Div


Stuff is not centering in Div

By : prash.ever
Date : November 18 2020, 03:49 PM
Hope that helps I'm a newbie at this and I'm trying to figure out what I'm doing wrong. I want to centre everything within a div, but it won't budge no matter what I do. , Thank you for all your suggestions! This is what I've ended up doing:
code :
#main1 {
width:100%;
height:700px;
margin:0;
background-color:#CCC;
position:relative;
}
#title {
display: block;
margin-left: auto;
margin-right: auto;
position:absolute;
top:300px;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
}
#intro {
width:50%;
text-align:center;
position:absolute;
bottom:0px;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
}


Share : facebook icon twitter icon
How can I use a regular expression to match something in the form 'stuff=foo' 'stuff' = 'stuff' 'more stuff'

How can I use a regular expression to match something in the form 'stuff=foo' 'stuff' = 'stuff' 'more stuff'


By : Jeff MacDonald
Date : March 29 2020, 07:55 AM
Does that help Actually I wouldn't use a regex for that at all. Assuming your language has a split operation, I'd first split on the | character to get a list of:
code :
'51NL9637X33'
'ISL6262ACRZ-T'
'QFN'(~51NL9637X33) = '51NL9637X33'
'ISL6262ACRZ-T'
'INTERSIL'
'QFN7SQ-HT1_P49'
'()'
'51NL9637X33'           <null>
'ISL6262ACRZ-T'         <null>
'QFN'(~51NL9637X33)     '51NL9637X33'
'ISL6262ACRZ-T'         <null>
'INTERSIL'              <null>
'QFN7SQ-HT1_P49'        <null>
'()'                    <null>
html/css box model structure, centering and stuff

html/css box model structure, centering and stuff


By : Mariya Petkova
Date : March 29 2020, 07:55 AM
Hope this helps Ok. I looked at your original jsfiddle and tried removing the 270px margin constraint in your fill div, as you said the bottom fill behaved wrongly in IE. I see what you mean, in IE9, your height was WAY bigger than the top fill div. I removed this constraint and it started behaving properly in IE9. http://jsfiddle.net/fLGUh/3/ BTW, it also works the same in IE7.
Also, your div id="fill" should have been class="fill".
CSS centering stuff

CSS centering stuff


By : allanmcd
Date : March 29 2020, 07:55 AM
this will help wrap the button within a div and make the div have text-align:center. like so:
code :
<div style="text-align:center">
    <button>Button Text</button>
</div>
body {
  background: url('background.jpg')
}
header {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  height: 100px;
  margin: auto;
  text-align: center;
}
h2 {
  position: relative;
  font-size: 44px;
  color: white;
  bottom: 15%;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  word-spacing: 4px;
}
p {
  text-align: center;
  color: black;
  font-size: 22px;
  font-family: 'Roboto Mono', ;
  border: 6px solid black;
  padding: 12px;
  width: 150px;
  margin: 0 auto;
}
<!DOCTYPE html>
<html>

<head>
  <title>hhchh</title>
  <script type="text/javascript" src="N:\Desktop\Javascript\JS.js"></script>
  <link rel="stylesheet" type="text/css" href="N:\Desktop\Javascript\appStyle.css">
  <link href='http://fonts.googleapis.com/css?family=Orbitron:500' rel='stylesheet' type='text/css'>
  <link href='http://fonts.googleapis.com/css?family=Roboto+Mono:300' rel='stylesheet' type='text/css'>
</head>

<body>
  <header>
    <h2>text and stuff</h2>
    <p>button text</p>
  </header>
</body>

</html>
Multiple html stuff stuff stuff

Multiple html stuff stuff stuff


By : Nick Thomas
Date : March 29 2020, 07:55 AM
I hope this helps . if I understand the question correctly it sounds like you want to do something like:
code :
$(document).ready(function() {
  $('a').click(function(){myFunction()});
});
function myFunction() {
  $('#stuff').empty().append("<p>new html</p>")
}
Centering stuff with bootstrap

Centering stuff with bootstrap


By : seavortex
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further Many issues in your template.
Firstly a missing "=" sign after the class attribute in
    code :
    <!DOCTYPE html>
    <html lang="en">
    
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <meta http-equiv="X-UA-Compatible" content="ie=edge">
      <title>Member area</title>
      <link rel="stylesheet" href="style.css">
      <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
      <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
      <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
      <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
    </head>
    
    <body>
      <!-- NAV BAR -->
      <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <a class="navbar-brand" href="#">PlaceHolder</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
    
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
          <ul class="navbar-nav mr-auto">
            <li class="nav-item">
              <a class="nav-link" href="#">Home
                            <span class="sr-only">(current)</span>
                        </a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="#">About me</a>
            </li>
          </ul>
    
          <ul class="navbar-nav ml-auto">
            <li class="nav-item">
              <a class="nav-link" href="#">Member Area</a>
            </li>
          </ul>
    
        </div>
      </nav>
      <!--END OF NAV BAR-->
    
      <!-- LOG IN FORM-->
      <div class="container">
        <form action="">
          <div class="form-group">
    
            <div class="row">
              <div class="col-lg-4 offset-lg-4 text-center">
    
                <div class="">
                  <label for="username">Username</label>
                  <input type="username" class="form-control" id="username" placeholder="Enter username">
                </div>
                <div class="">
                  <label for="password">Password</label>
                  <input type="password" class="form-control" id="password" placeholder="Enter password">
                </div>
                <div class="">
                  <input type="submit" class="form-control" id="submit" value="Submit">
                </div>
              </div>
            </div>
          </div>
    
        </form>
      </div>
    
      <!-- END OF LOGIN FORM-->
    </body>
    
    </html>
Related Posts Related Posts :
  • Font acting differently on IE and Firefox
  • Encoding and decoding of the character references
  • An Image Button navigate to another site html/css
  • IE8 "Save Target as ..." won't display for block elements
  • Image hover transition for span - CSS
  • How to apply min and max on textarea?
  • How to draw multiple horizontal lines (Notebook Paper effect) using css?
  • Table Printing Issue: Gaps in top and Bottom Border of th Elements
  • grouping elements with div and applying stylesheet for that group
  • Click <div> to expand, then click again to shrink - Its expanding, just not shrinking
  • CSS - How can I center a <script>'s output?
  • Django's template variable gets interpreted as HTML
  • ngx datatable vertical scroll with rowheight set to auto
  • How to make input text border with CSS when it's OnFocus
  • Anyone know of a calendar web widget for my website I could use?
  • How does Bootstrap manage to use fixed positioning for navbar on iOS?
  • Centered text in fully clickable table cell
  • Compare HTML and HTML5
  • steps of creating webpage in bangla
  • css root element margin
  • What is the point of using absolute positioning in CSS?
  • Responsive solution for long URLs (that exceed the device width)
  • Divs don't collapse as they should - media queries
  • QTreeWidgetItem display html
  • Testing html/css image on local from jfiddle
  • long attribute value of HTML
  • Why my svg picture is truncated at the bottom when embedded in html
  • Display CSS: some divs fixed, some flexible (2)
  • How to append href strings with variables in html with PHP?
  • css - Why is there a big white space between text lines?
  • div image position fixed + scroll
  • Hide specific elements from html using css
  • how to align the arrow in menu item?
  • How do I create a trapezoidal button using CSS?
  • Background position seems to be inaccurate
  • CSS background color is overruled by the background image
  • Oblique or twisted border shape
  • Overflow in div tag doesn't work
  • How to show the vertical image into horizontal manner using HTML and CSS?
  • css3 animation issue move div to left and move it back
  • HTML <code> - get rid of newlines
  • Vertical Align Two Spans (Different font size)
  • Position fixed not working with video poster
  • Having issues placing html buttons side by side in a form
  • how to center text in the middle of the page
  • Sublime Autocompletion for HTML using Emmet inside .sublime-autocompletion file
  • Align bottom wrapped text at the left of an image
  • I'm trying to get :after:hover to work
  • Header and Picture won't Display Correctly
  • SVG stacking, anchor elements, and HTTP fetching
  • Positioning two elements on opposite ends of a 100% with header
  • How to overlay an image inside an image with HTML, CSS
  • Selected date isn't kept in select box
  • How to change background colour of entire div on hover?
  • Two gradients with two distinct sections with just one div element
  • Indent even rows of hexagons in CSS
  • Unwanted filled letters in webpage
  • Mask password character size too small
  • Show div #2 while hovering relative div #1 with translition effect in one container
  • Stacking Tables for a responsive HTML email
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org