Menu
  • HOME
  • TAGS

Navigation bar overlapping content text

Tag: navigation,position,z-index,overlap,overlapping

my content text is being overlapped by my navigation bar. I have looked at other questions like this, but i have not been able to fix this.
I think that it might be because of my "z-indexes". I need the functionality of the page to stay somewhat the same as now, i just need to be able to see the top of the content text.

I believe that the code i have put in here should be enough to see what the solution to this problem could be.

p, div, a
{
    font-family: "Century", sans-serif;
}

ul 
{
	list-style-type: none;
}

li
 {
	display: inline-block;
	padding: 0;
	margin: 0;
	font-size: 15px;
}

nav
{
	text-align: center;
}

img 
{
	min-height: 100%;
	min-width: 100%;
}

.content
 {
	z-index: -10;
	position: fixed;
	text-align: center;
	min-height: 100%;
	min-width: 100%;
}

.textbox
 {
	z-index: -5;
	position: absolute;
	margin-left: 11%;
	margin-top: 1%;
	text-align: left;
	color: #000000;
}

.rubrik
{
	font-size: 35px;
	font-weight: bold;
}

.brod
{
	font-size: 18px;
}

.header
{
	box-shadow: 0px 4px 25px #000000;
	position: fixed;
	width: 100%;
	background-color: #FFFFFF;
}

body
{
	margin: 0;
}

html
{
	overflow-y: scroll;
}
<body>
	<div class="wrapper">
		<div class="header">
			<nav>
				<ul>
					<li> <a href="index.php">FORSIDE</a> </li>
					<li> <a href="nyheder.php">NYHEDER</a> </li>
					<li> <a class="currentpage" href="hvem-er-vi.php">HVEM ER VI?</a> </li>
					<li> <a href="om-moellevangen.php">OM MØLLEVANGEN</a> </li>
					<li> <a href="vaerdigrundlag.php">VÆRDIGRUNDLAG</a> </li>
					<li> <a href="vedtaegter.php">VEDTÆGTER</a> </li>
					<li> <a href="galleri.php">GALLERI</a> </li>
					<li> <a href="kontakt.php">KONTAKT</a> </li>
				</ul>
			</nav>
		</div>

		<div class="content">
			<img src="files/forside3.png"/>
		</div>	
		
<div class="textbox">
	<p class="rubrik">
	Bestyrelsen
	</p>

	<p class="brod">
	Formand:</br>
	Anne, Galsted</br>
	Tlf: </br>
	Mobil: </br>
	</br>
	Næstformand:</br>
	Niels, Agerskov</br>
	Tlf: </br>
	Mobil: </br>
	</br>
	</p>
</div>

</body>

Best How To :

Your source code is not formatted well in here but in these cases I add a padding-top to the container or a margin-top to the child.

e.g. (you need to choose a better class name than textbox but anyway)

div.textbox
{
    margin-top: 60px;
}

CSS drop down navigation

css,html5,css3,drop-down-menu,navigation

You have to add a position:absolute to the selector .navigation li ul .navigation{ margin-right: auto; margin-left: auto; width: 100%; background-color: #0f9cde; position: absolute; display: block; margin-bottom: 15px; z-index: 1000; margin-left: -15px; } /*Strip the ul of padding and list styling*/ .navigation ul{ list-style-type: none; margin: 0 auto; padding: 0; position:...

How to seperate wordpress header navigation into side to side by edition Php files?

php,css,wordpress,header,navigation

Try this and put the css .fullWidth{ width : 100%; margin : 0 auto; } .leftClass{ width : 75%; float : left; } .rightClass{ width : 25%; float : right; } add class in div tag <nav class="navbar navbar-default" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"> <span...

Bootstrap button and navigation bar not working

html,css,twitter-bootstrap,button,navigation

Try the following 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"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <title>Bootstrap 101 Template</title> <!-- Bootstrap --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">...

Navigation icon not showing up on mobile version?

html,css,mobile,navigation

background-image does not have the multiple properties like position center. it should be background. Also for repeat syntax should be background-repeat. Update your CSS like below. #menu-icon { display: none; background: url(http://www.w3newbie.com/wp-content/uploads/icon.png) center; width: 40px; height: 40px; background-repeat: no-repeat; } Or You can use it like below. #menu-icon { display:...

Saving Sprite Position

java,libgdx,position,sprite

Based on provided additional information. Sprite methods getX() and getY() returns float values. So you can assign values returned by these methods to variables of type float for later use. float lastX, lastY; if(sprite.getY()>=700){ lastX = sprite.getX(); lastY = sprite.getY(); enemyIterator.remove(); Pools.free(sprite); } System.out.println("Removed sprite coordinates where: " + lastX...

CSS / HTML Navigation and Logo on same line

html,css,navigation

The <ul> is by default a block element, make it inline-block instead: .navigation-bar ul { padding: 0px; margin: 0px; text-align: center; display:inline-block; vertical-align:top; } CodePen Demo...

setLocation on a JButton doesn't seem to work as expected

java,swing,position,jbutton,layout-manager

What could be the problem? Wanting to set explicit locations. Fighting the layout manager. Java GUIs have to work on different OS', screen size, screen resolution etc. using different PLAFs in different locales. As such, they are not conducive to pixel perfect layout. Instead use layout managers, or combinations...

Element on my website overlaps on menu

html,navigation

Unforantly I don't know how to do it using simple CSS but instead I; Step 1 Change the timers div from; <div class="container centered"> To <div class="container centered" id="timerBox"> Step 2 Add a new class to all of the nav's links with 'onclick' <a class="onclick" href="#">Connect</a> Step 3 Finally the...

Position JavaFX Button in a specific location

button,layout,javafx,position,location

If you want to specify the exact co-ordinates of your node, you can use a Pane instead of StackPane. Your button, if added to a StackPane or similar layout which supports alignment, must use the translate properties to move the button. You cannot use setLayoutX() or setLayoutY() with these layouts....

Javascript to change class in
    tag not working

javascript,asp.net-mvc,twitter-bootstrap,navigation

There is nothing like $window and it will give you error and wont run the script change $window.width() to $(window).width() $window will give you error of undefined...

How to move this div left based on updated x position value?

javascript,css,position

Oops, change: carousel.style.left = (currentX - 20)+'px'; to: carousel.style.left = (currentX.x - 20)+'px'; ...

WPF PRISM - Display multiple pop-up view on the same time

wpf,navigation,prism,regions

It turned out that the solution is easier than I expected. Here is the solution in case if enybody needs it. I just had to modify the RegionPopupBehaviours to use AllActiveregion instead of the original SingleActiveRegion and in the DialogActivation I had to remove the first call to the CloseContentDialog....

How do I remove Sprites when they go on a specific position?

java,libgdx,position,sprite

As Subler says, the problem here is that you're trying to remove something from a list at the same time as iterating over it. However, there's an easier solution. Simply call remove() on the iterator. This will remove the iterator's current element. //removing the enemy while (enemyIterator.hasNext()) { Sprite nextEnemy...

bootstrap responsive navigation. Toggle button position

mobile,responsive-design,navigation,bootstrap

Here is the updated js fiddle $(document).ready(function() { $('#arrowSearch').click(function() { $('#browseContent').toggle(); $('#arrowSearch').css("display", "none"); $('#arrowSearch2').css("display", "inline"); return false; }); $('#arrowSearch2').click(function () { $('#browseContent').toggle(); $('#arrowSearch2').css("display", "none"); $('#arrowSearch').css("display", "inline"); return false; }); }); ...

How can I get text to appear only in a div 'window' while scrolling by?

css,position,fixed

If you want a pure CSS implementation, you can use negative z-index's: body{ height: 1000px; } div{ position: relative; background:white;/*Covers the text, or you can see it through*/ } #text-container { position: relative; height: 300px; /*width: 400px;*/ background: cyan; overflow: hidden; width:100%; z-index:-2;/*Places it behind everything*/ } #text-container .boxtext {...

Trying to get just “x” coordinate from pos() method python

python,position,mouseevent,pyqt4

I'm not 100% clear what your problem is (are you getting an exception? Does it run but you get unexpected output?), but this line looks like the culprit: self.x,y = self.cursor.pos() This will create x as an attribute of self, and then create a local variable y that has no...

“position:fixed” Not Working For Header Menu

css,menu,position,fixed

This is because the transform creates a new local coordinate system - http://www.w3.org/TR/css3-2d-transforms/#transform-rendering Here's a look here body { background-color: #1B725F; color: #333; /*font-family: "brandon-grotesque", "adelle", "Times New Roman", sans-serif;*/ font-family: "brandon-grotesque", "adelle", sans-serif; font-size: 18px; font-weight: 100; font-style: normal; line-height: 1.625; position: relative; -webkit-transform: translate3d(0,0,0); <-- here transform: translate3d(0,0,0);...

Identify when MKRoutestep finishes

ios,navigation,mapkit,directions,mkpolyline

Since no one has answered to my question I am answering it myself so that it may help someone looking for the same. So instead of using distance value of MKRouteStep to calculate when to show next instruction, we can use the last coordinate of polyline array provided by MKRouteStep....

Return the position clicked in recyclerview in a different Activity?

android,onclick,position,recyclerview

You need to pass data in a bundle and add it to the intent of the new activity. // onClick at recycler Intent intent = new Intent(); intent.setClass(context, Other_Activity.class); intent.putExtra("SOME_ID", position); startActivity(intent); //Second activity @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle extras = getIntent().getExtras(); if (extras != null) {...

Bootstrap Thumbnail Cropping and Positioning

css,twitter-bootstrap,position,overflow,crop

Here's what I came up with, using JavaScript and another thumbnail container. @*HTML-----------------------------------------------*@ @foreach (var item in Model) { <div class="avatar-container"> <div class="img-thumbnail"> <img class="avatar img-thumbnail" src="@Href("~/Content/Avatars/",item.Name+".jpg")" /> </div> </div> } @*JavaScript-----------------------------------------*@ //If the image has greater Width => display as landscape <script> $(".avatar").each(function () { if (this.naturalWidth >...

How do I force jquery terminal to remain the same size?

jquery,scroll,terminal,position,jquery-terminal

Add a height option: JS $('#terminal').terminal(function (command, term) { if (command == 'test') { term.echo("you just typed 'test'"); } else { term.echo('unknown command'); } }, { prompt: '>', name: 'test', height: 200 }); Demo: http://jsfiddle.net/11o3spLd/...

Controlling/moving an object in a circular motion in Unity

c#,unity3d,rotation,position

float timeCounter = 0; void Update () { timeCounter += Input.GetAxis("Horizontal") * Time.deltaTime; // multiply all this with some speed variable (* speed); float x = Mathf.Cos (timeCounter); float y = Mathf.Sin (timeCounter); float z = 0; transform.position = new Vector3 (x, y, z); } ...

uncaught typeError: cannot read property 'querySelectorAll' of null

javascript,jquery,mobile,navigation,internet-explorer-11

Your desktop site does not have an element with an ID of "mp-menu." When you call the getElementById method, you're getting null in response. This is then assigned to the el property of the object. When you attempt to call querySelectorAll, you're attempting to do so from a null value....

Two navbars collapsed into 1 for mobile?

css,twitter-bootstrap,menu,navigation

Copy the 2nd nav bar into the same list as the main nav bar. Then add classes to the main nav bar to hide them on large desktops. <div id="main-menu" class="navbar navbar-default navbar-static-top" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-menu"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span>...

Android navigation drawer always open on tablet

android,navigation,fragment,drawer

I do not have the precise knowledge but a workaround could be to make a different xml file for large devices without the DrawerLayout so when it runs on a tablet it will return null and no other boolean will be neede in the code and this will make the...

Why navigation controller does not navigate in callback using Swift?

swift,callback,navigation,navigationcontroller

Finally, I've found the reason for such weird behavior: The callback is running on a thread which is separate from the UI thread. In order to allow a fragment of code to do UI-related things you have to use dispatch_async() method. Here is my updated code with working navigation using...

How to make Google Chrome and iOS remember scroll position in div after returning back?

css,browser,scroll,position,back

Demo Url and Session Based https://jsfiddle.net/w2wkcx0e/6/ Demo Url Based https://jsfiddle.net/w2wkcx0e/3/ Demo https://jsfiddle.net/w2wkcx0e/1/ you could save the position at leaving page and reload it upon page reloading. Let me know if doesn't work in all browsers you want it to work. if (localStorage.scrollPos != undefined) $('#container').scrollTop(localStorage.scrollPos); window.onbeforeunload = function () {...

How to get info about previous page on Frame.GoBack()

c#,navigation,windows-phone-8.1

I think you should be able to do it by using Frame.ForwardStack property which holds forward navigation history. A short sample which should work: protected override void OnNavigatedTo(NavigationEventArgs e) { var lastPage = Frame.ForwardStack.LastOrDefault(); if (lastPage != null && lastPage.SourcePageType.Equals(typeof(desiredPage))) { /* do something */ } } ...

MVC5/Bootstrap: adding to Nav doesn't push body content down

layout,twitter-bootstrap-3,navigation,asp.net-mvc-5.1

Apparently, bootstrap's "navbar-fixed-top" means it's CSS position:fixed keeps it at the top and above everything else. So, what is needed is padding-top in the body like this: @{ // Sub-Menu for About Sections if (HttpContext.Current.Request.RequestContext.RouteData.Values["controller"].ToString().Contains("About") || HttpContext.Current.Request.RequestContext.RouteData.Values["controller"].ToString().Contains("Executive") ||...

How to correctly position a “X” in a rectangle?

c#,position,draw,square

It seems like the issue is where you are using your MidpointRounding.AwayFromZero It seems to me that if the sum you have to calculate the position you want to draw the 'X' gives the result 6.6, you want to have it in position 6, not position 7, so realistically you...

Android - Cannot find symbol variable drawer_open when implementing navigation bar

android,navigation,drawer

Did you have drawer_open and drawer_close in your strings.xml? I think you didn't add these two strings in your strings....

Unwanted animation of the NavDrawer when getting back to previous Activity

android,performance,navigation,navigation-drawer

You should not close the Drawer when resuming the Activity: @Override public void onResume(){ mDrawerLayout.closeDrawer(Gravity.START); //this should have been done before super.onResume(); } Instead you should close it when starting an Activity from the drawer: @Override public void onClick(View view, int position) { switch(position){ case 0 : { Intent myIntent...

CSS bring img to front

html,css,position

The problem lies on the 2nd z-index. Make it -1 like this: itemimg { display: block; width: 200px; height: 200px; } itemimg img:nth-child(1) { z-index: 9999; } itemimg img:nth-child(2) { z-index: -1; //make this -1 } itemimg img { position: absolute; border-top-left-radius: 5px; border-top-right-radius: 5px; width: 200px; height: 200px; }...

Align text on top, right, bottom and left of image?

css,position

You should add wrapper around Your image (for now it can be body), ad give it position: relative; Then modify .right class: .right { display: inline-block; background-color: #F00; transform: rotate(90deg) translate(0, -50%); position: absolute; right: 0px; top: 50%; } updated fiddle...

CSS percentage width not working

html,css,navigation,width,percentage

Add width: 100%; to ul#menu. Check it our here: https://jsfiddle.net/vjhz7o8y/5/. Also, avoid using the same id for multiple elements, use class instead. ul#menu { height:25px; width:100%; float:right; margin:0; padding:0; list-style-type:none; background:#44546A; } ...

Simple jq slider via position

javascript,jquery,position

Try using flags and setting them in each respective handler like $(function() { var slideWidth = $('#slider ul li').width(); var next = true; var prev = false; $('a.control_next').click(function() { if (next) { $('ol > li:first-child > a').removeClass('active'); $('ol > li:last-child > a').removeClass('control_next'); $('ol > li:first-child > a').addClass('control_prev'); $('ol > li:last-child...

How to create a mobile navigation toggle using pure CSS?

css,css3,navigation,toggle

CSS and HTML alone can respond to click. You should be able to use :focus, as long as each element is discretely wrapped in it's own HTML element which has a tab index You can try this by opening the dev tools, selecting an element on this page and selecting...

Style UL LI list so all elemetns are vertically aligned and flushed left?

css,navigation

You can use flex for do that, well you can use float as well, but I like use flex, very easy. For add a new column you don´t need to do anything. Here you have a full example to play: http://codepen.io/luarmr/pen/waqxmY the important things are: 1- apply a different style...

Magnific Popup position bug

google-chrome,firefox,position,magnific-popup

In order to stop this behaviour just add this CSS: .image-popup { display:none; } .hover-container:hover .image-popup { display:inline-block; } ...

Unity3D: Adding charged force in relation to position

c#,unity3d,position,transform

It's been awhile since I've did Unity coding, so there may be some minor errors with my syntax but it should give you an idea of how to accomplish this. Your best bet for the loop is to use a coroutine to not block the main thread. in Update() check...

UL LI 4 Column List: Center in each column

css,list,navigation

http://codepen.io/luarmr/pen/eNEjLp ul{ margin:0; padding:0; list-style-type:none; } ul.wrapper{ display:flex; } ul.wrapper>li{ flex:1; padding-left:4%; border-left:2px dashed #333; } ul.wrapper>li ul li{ padding-left:0%; } And play with padding-left in percentaje for example I remove it the prefix, but the example is with prefix...

Jekyll and Liquid for-loop

html5,for-loop,navigation,jekyll,liquid

You're comparing two counter that are not working the same way. {% assign imgIndex = {{forloop.index0}} This will count from 0 to array.size-1 {% assign naviIndex = {{forloop.index}} This will count from 1 to array.size As your not in the same "time zone", for the first image you have imgIndex...

Mapbox: Marker Nav links outside of map

javascript,navigation,mapbox,markers

Here it is. All you have to do is something like: var content = '<h2>New Content!<\/h2>' + '<p>' + marker.feature.properties.title + '<br \/>' + 'link: ' + marker.feature.properties.weburl + '<\/p>'; marker.bindPopup(content); ...

CSS List Navigation: Align All Items Left, but Last Item Right

css3,navigation

Here's a solution using the css alignment property, flexbox. Its a little bit cleaner than using floats because it keeps everything in document flow. Just note it supports IE browsers 9 and up .menu { display: -webkit-flex; display: -ms-flex; display: flex; } .menu li { display: inline-block; list-style: none; }...

IOS draggable objects not saving position

ios,position,uigesturerecognizer

Make sure the buttons aren't handled with autolayout. If you are working in IB, make sure to remove all constraints from the buttons. Or, if you want to keep using autolayout, then update the constraints on the button rather than updating it's center position. You can do this by removing...

multi site not showing the header/nav on one site [closed]

javascript,css,magento,navigation

There ar unclosed divs in Your header template and .header-container "eats" other tags. You should add three more </div> before .nav-container (I guess at the end of header template)

Child div will not over-lap parent div with a z-index added

html,css,position,css-position

Here is the working jsfiddle: https://jsfiddle.net/Lrdswa5a/5/ If you replace your '.featuredproductspic' and '.viewproductbutton' with the following: .featuredproductspic { /*width: 100%;*/ border: 1px solid #D9D9D9; min-height: 350px; max-height: 350px; float: left; position: relative; } and .viewproductbutton { width: 150px; padding: 15px 15px; background-color: #909090; color: #FFFFFF; font-size: 1em; font-weight: bold; cursor:...

Unity3D: Moving a child to orbit a parent

c#,unity3d,position,transform

whenever I move the parent of the object, the child stays and no longer moves around the parent Thats because you are moving the sphere via transform.position when it should be transform.localPosition Either that or you could do transform.position = transform.parent.position + new Vector3 (x, y, z); EDIT: personally,...

Positioning a div using JQuery

javascript,jquery,html,css,position

See comments inline in the code: // On mousemove on #sp element $('#sp').mousemove(function(e) { // Get the current mouse positions var x = e.pageX, y = e.pageY; // Update the position of `#sp_info` dynamically $('#sp_info').css({ 'position': 'absolute', 'top': y + 5, // Leave some margin 'left': x + 5, //...

Windows Phone page navigation does not work

c#,.net,navigation,windows-phone-8.1

You are missing a reference for the 'Click'-event handler. Please change your XAML to this: <HyperlinkButton x:Name="but_elf" Content="Elfy" HorizontalAlignment="Center" Margin="100,125,100,255" Grid.Row="1" VerticalAlignment="Center" Width="200" Height="70" Click="but_elf_Click" /> Please see: C# Documentation for Click on MSDN C# Documentation for HyperlinkButton on MSDN...