How to fix position of CSS elements? - php

I would like to create a website with a tile layout, similar to the new Windows style. https://dab1nmslvvntp.cloudfront.net/wp-content/uploads/jquery4u/2013/03/metro-template.png <- kind of like this, except that in my case:
each tile is the same size (square) (.box)
The text should be in the centered in the tile (.center-box-content)
each tile should entail two buttons in its lower right corner, in addition to the text (.lower-right-box-content)
The buttons are edit and trash icons, so that the text in the tiles can be changed.
I have accomplished this, but the problem is: The buttons seem to be dependent on the text length.
I've assigned them an absolute position in the css file, yet they don't stay put.
If the text in the tile is longer, they move all the way past/beyond the tile's borders, which they shouldn't surpass. It's a complete mess. I have tried everything but I can not find a solution. I am hoping that you guys can take a look and maybe see what I am missing? Here's my CSS Code:
.box {
width: 200px;
height: 200px;
margin: 2px;
color: whitesmoke;
float: left;
padding: 7px;
}
.center-box-content {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
position: relative;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.lower-right-box-content {
position: absolute;
float: right;
padding: 2px;
bottom: -60px;
right: -5px;
}
.red-box {
background-color: indianred;
}
.blue-box {
background-color: deepskyblue;
}
.green-box {
background-color: mediumseagreen;
}
Here is my HTML Code: (The PHP bit just reads out the text from the data base, which is an event name, event description, and event date)
<!--the entire square tile -->
<div class="box red-box" height="100%" width="100%">
<!--this centers the text within the tile -->
<div class="center-box-content">
<!--echo the name -->
<b><?php echo $row["title"]; ?></b>
<!--echo the description -->
<?php echo $row["description"]; ?>
<br> • <!--echo the date -->
<?php echo $row["date"]; ?> •
<!--edit and delete button in the lower right corner of the tile -->
<!--this is the part that keeps moving as the text gets longer -->
<div class="lower-right-box-content">
Upcoming Events <span style="display:inline-block; width: 20px;"></span>
<a href="#">
<span class="glyphicon glyphicon-pencil glyphicon-pencil" role="button"> </span>
</a>
<a href="deleteevent.php?id=<?php echo $row["eventid"];?>">
<span class="glyphicon glyphicon-trash glyphicon-trash" role="button"></span>
</span>
</a>
</div>
</div>
</div>
<?php };
?>

For ideal management of "box" today we use the grid. One example css for 6-columns grid:
body {
font-family: 'Ariel', sans-serif;
font-weight: 100;
font-size: 1em;
color: #faf3bc;
background-color: #0976B2;
}
.grid_1 { width: 15.625%; } /* 125px/800px = 15.625% */
.grid_2 { width: 32.5%; } /* 260px/800px = 32.5% */
.grid_3 { width: 49.375%; } /* 395px/800px = 49.375% */
.grid_4 { width: 65.625%; } /* 525px/800px = 65.625% */
.grid_5 { width: 83.125%; } /* 665px/800px = 83.125% */
.grid_6 { width: 100%; } /* 800px/800px = 100% */
.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6 {
/* margin-right: 1.25%; */
float: left;
display: block;
}
.last {margin-right:0; }
.container{
clear:both;
width: 90%;
max-width: 800px;
padding: 0% 0;
margin: auto;
}
img {
max-width: 100%;
}
h1 {
color: #ffffff;
}
a:link {color:#b4c34f; text-decoration:none;} /* unvisited link */
a:visited {color:#b4c34f; text-decoration:none;} /* visited link */
a:hover {color:#faf3bc; text-decoration:underline;} /* mouse over link */
a:active {color:#b4c34f; text-decoration:none;} /* selected link */
a.selected {color:#ffffff;} /* selected link */
ul {
list-style-type:none;
}
.form-input {
height: 30px;
}
#media screen and (max-width : 705px) {
.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6 {
width: 100%;
}}
HTML for 3 "box" in raw:
<div class='grid_2'>
</div>
<div class='grid_2'>
</div>
<div class='grid_2 last'>
</div>
HTML for 2 "box" in raw:
<div class='grid_3'>
</div>
<div class='grid_3 last'>
</div>
Maybe you need more grid-columns, go ahead, learn responsive web design.

Is the square the direct parent of those absolutely positioned elements? It should be, and it needs to have position: relative for the absolute position to work.
And erase the float from those elements - it doesn't make sense for absolutely positioned elements.

Here is the jsfiddle link
You need to set the .lower-right-box-content to position:relative and then make the buttons absolute positioned.
<div class="lower-right-box-content">
<div style="display:inline-block;margin-right:40px;text-align:justify;"> Upcoming Events longggg text does not matter </div>
<a href="#">
<span class="glyphicon glyphicon-pencil glyphicon-pencil" role="button" style='position:absolute;bottom:10px;right:5px;'> </span>
</a>
<a href="deleteevent.php?id=<?php echo $row["eventid"];?>">
<span class="glyphicon glyphicon-trash glyphicon-trash" role="button" style="position:absolute;bottom:10px;right:20px;">
</span>
</a
</div>
</div>
I have used inline styles for clarity. Please update the styles in stylesheet with appropriate selectors.

Place the buttons in their own div.
Add position: relative to the box.
Use position: absolute to place the text and buttons to the bottom.
To ensure longer text does not overlap with the buttons, add some padding to the text.
.box {
width: 200px;
height: 200px;
margin: 2px;
color: whitesmoke;
float: left;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
position: relative;
}
.center-box-content {
text-align: center;
}
.upcoming {
position: absolute;
bottom: 0;
text-align: center;
left: 0;
right: 0;
padding: 0 30px; /* ensure the text clears the buttons */
}
.buttons {
position: absolute;
bottom: 0;
right: 0;
}
.red-box {
background-color: indianred;
}
.blue-box {
background-color: deepskyblue;
}
.green-box {
background-color: mediumseagreen;
}
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<div class="box red-box">
<div class="center-box-content">
<b>Name</b>
<br>Description
<br> • Date •
</div>
<div class="lower-right-box-content">
<span class="upcoming">Upcoming events</span>
<div class="buttons">
<a href="#">
<span class="glyphicon glyphicon-pencil glyphicon-pencil" role="button"></span>
</a>
<a href="#">
<span class="glyphicon glyphicon-trash glyphicon-trash" role="button"></span>
</a>
</div>
</div>
</div>
<div class="box red-box">
<div class="center-box-content">
<b>Name</b>
<br>Description
<br> • Date •
</div>
<div class="lower-right-box-content">
<span class="upcoming">Upcoming events events events</span>
<div class="buttons">
<a href="#">
<span class="glyphicon glyphicon-pencil glyphicon-pencil" role="button"></span>
</a>
<a href="#">
<span class="glyphicon glyphicon-trash glyphicon-trash" role="button"></span>
</a>
</div>
</div>
</div>

Related

How to get the id of a new to send to JS and bring the full new?

What's up guys!
I'm joking a little with Laravel and I'm setting up a news area, which when clicking the div of the news the complete news overlaps. And I was able to make the css and div complete, but the overlapping news is just id = 1.
How can I correct to get the full story according to her id? As an example of what is happening:
https://screenshots.firefoxusercontent.com/images/be917d35-3aa5-408c-87d1-839fea32a4f6.png
https://screenshots.firefoxusercontent.com/images/fbc99ce8-c76c-4a54-9ece-d77eb0d750d9.png
I do not know if it was understandable, but the news I bring in the foreach for the "noticia" div gets correct but when cliaring and bring the "notice-full" it after only the complete news of the one that owns the id = "1" instead id = "2" ...
HTML:
<div class="noticiario">
<?php foreach ($noticias as $noticia) { ?>
<div class="noticia" data-noticia-id="{{ $noticia->id }}">
<div class="imagem-noticia" style="background-image: url('{{ $noticia->img }}')"></div>
<div class="descricao-noticia">
<h2 class="titulo-noticia">{{ $noticia->titulo }}</h2>
<span class="sobre-noticia">{{ $noticia->resumo }}</span>
</div>
<div class="noticia-inteira">
<span class="noticia-titulo"><?php echo $noticia->titulo; ?></span>
<?php echo $noticia->texto; ?>
<a class="fechar-noticia"><i class="fa fa-times-circle" aria-hidden="true"></i></a>
</div>
</div>
<?php } ?>
CSS:
.noticiario .noticia {
cursor: pointer;
display: inline-block;
margin-top: 25px;
width: 360px;
.noticiario .noticia-inteira {
background: #e8ecef;
border: 1px solid #dadada;
border-radius: 6px;
box-sizing: border-box;
display: none;
height: 100%;
left: 0;
padding: 20px 50px;
position: absolute;
top: 0;
width: 98%;
JS:
$(document).ready(function() {
$(".noticia-inteira").hide();
$(".noticia").bind("click",function(){
$(".noticia-inteira").slideToggle(300);
return false;
});
});
If anyone could help, I would be very grateful, right away!
Try this solution:
$(".noticia").bind("click",function(){
$(this).find(".noticia-inteira").slideToggle(300);
});

Wordpress - CSS styling not applying on a row

I'm currently building a site on Wordpress using the html5blank as the parent theme. I've built all the front-end text pages on HTMl/CSS. When I've transferred all the files over a lot of the styling has broken - I've fixed the majority of it but there's one section that I cannot fix. This is how it should look -
And this is how it looks in the Wordpress site -
When I've inspected the site via developer tools it seems as though these rules are not being applied -
.agencyproducts {
position: relative;
display: inline-block;
text-align: center;
}
Also, the row in the front-end site is applying a height rule but not in the wordpress site. I've looked at applying specificity rules and !important but nothing (this also disrupts other styling rules on other parts of the site). I'm really stuck on this and would appreciate any assistance.
Here's the full code for the section -
section#products {
height: 800px;
max-width: 100%
}
.agencyproducts {
position: relative;
display: inline-block;
text-align: center;
}
.agencyproducts p {
text-align: center;
margin: 30px;
}
.agencyproducts img {
width: 70px;
height: 70px;
position: relative;
line-height: 1;
top: 50%;
}
figure {
text-align: center;
display: inline-block;
max-width: 80px;
height: 100px;
vertical-align: top;
margin: 5px;
font-size: 9px;
margin-bottom: 60px;
}
figure img {
padding-bottom: 5px;
}
.four {
padding: 0;
margin: 0;
border: 0;
}
.images {
margin-top: 30px;
border-bottom: 10px;
}
.images img {
margin-left: 20px;
padding: 10px;
}
.chevron {
height: 150px;
}
.chevron figcaption {
margin-top: 20px;
font-size: 13px;
color: #d3d3d3;
}
hr.hragency {
display: block;
width: 250px;
margin-top: 0em;
margin-bottom: 0em;
margin-left: auto;
margin-right: auto;
border-style: inset;
border-width: 1px;
border-color: #F0F0F0;
}
<section id="products">
<div class="container">
<div class="row">
<div class="twelve columns agencyproducts">
<p>WHAT PRODUCT ARE YOU INTERESTED IN?</p>
<a href="2k4kproduction.html">
<figure>
<img src="images/production.png" alt="Production">
<figcaption>2K / 4K PRODUCTION</figcaption>
</figure>
</a>
<a href="postproduction.html">
<figure>
<img src="images/post-production.png" alt="Post-Production">
<figcaption>POST PRODUCTION</figcaption>
</figure>
</a>
<a href="2d3danimation.html">
<figure>
<img src="images/animation.png" alt="Animation">
<figcaption>2D / 3D ANIMATION</figcaption>
</figure>
</a>
<a href="adhoc.html"><figure>
<img src="images/ADHOC.png" alt="ADHOC">
<figcaption>ADHOC</figcaption>
</figure>
</a>
<a href="interactive.html">
<figure>
<img src="images/interactive.png" alt="Interactive">
<figcaption>INTERACTIVE & PERSONALISED</figcaption>
</figure>
</a>
<a href="tvadverts.html">
<figure>
<img src="images/tv-adverts.png" alt="TV ADVERTS">
<figcaption>TV ADVERTS</figcaption>
</figure>
</a>
<a href="360video.html"><figure>
<img src="images/360.png" alt="360 Video and VR">
<figcaption>360 VIDEO & VIRTUAL REALITY</figcaption>
</figure>
</a>
</div>
</div>
<hr class="hragency">
<div class="row">
<div class="images">
<div class="four columns">
<img src="images/VIDEO.jpg" alt="Video">
<img src="images/blog.jpg" alt="blog">
</div>
<div class="four columns">
<img src="images/faq.jpg" alt="FAQ">
<img src="images/VIDEO.jpg" alt="Video">
</div>
<div class="four columns">
<img src="images/blog.jpg" alt="blog">
<img src="images/faq.jpg" alt="FAQ">
</div>
</div>
</div>
</div>
</section>
<section class="chevron">
<div class="container">
<div class="row">
<figure>
<figcaption>SEE MORE</figcaption>
<i class="fa fa-chevron-circle-down fa-3x" aria-hidden="true"></i>
</figure>
</div>
</div>
</section>
Try this:
.agencyproducts{
width:100%;
text-align:center;
}
.agencyproducts a{
display:inline-block;
}
Because container .agencyproducts need to have text-align:center and first childs of it must be displayed as inline-block ... then they will display properly. You only set child of a tag as display:inline-block but do not tell CSS how it should treat it parent.
With what I understood try appending !important to your custom css properties so as to override any pre-existing style properties.
height: 150px !important;

how to append a div through JQuery like the eCommerce website on click or focus

This is my HTML code
<div>
<div class="text-center col-xs-12 col-sm-12 col-md-12 col-lg-12">
<div class="col-md-3 col-sm-3 animate-box">
<div class="team-section-grid" style="background-image: url(assets/img/image-bg.jpg);">
<div class="overlay-section">
<div class="desc">
<i class="icon icon-wallet2"></i> Buy Now
</div>
</div>
</div>
<div class="text-center add-cart">
<a href="" title="">
<i class="icon icon-cart"></i> Add To Cart
</a>
<a href="" title="">
<i class="icon icon-heart" style="margin-left: 10px;"></i> Add To Wishlist
</a>
</div>
</div>
View More..
</div>
What i am trying to achieve through JQUery is whenever click the view more.. or whenever the focus is on that button I want the following div appended to the current div so that I can dynamically load products from the DB and append it.
Can anyone help me with that code? Thanks in advance..
Did you tried: http://api.jquery.com/append/ ?
A very simple example:
jQuery('.wrapper a').on('click', function(e){
e.preventDefault;
jQuery('.wrapper').append('<div class="item"></div>');
});
.wrapper{
position: relative;
background: #e6e6e6;
padding: 10px 10px 50px 10px;
}
.wrapper a{
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding: 10px 0;
background: #aaa;
color: white;
text-align: center;
border-top: 3px solid #fff;
}
.item{
display: block;
width: 100%;
height: 20px;
background: #ccc;
margin: 0 0 5px 0;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<div class="wrapper">
show more
<div class="item"></div>
</div>
Instead of append('<div class="item"></div>') you can append html-templates, too. It could be more comfortable to use a template engine here ...

Bootstrap Modal Contact Form Disappear

I have a problem with the Bootstrap Contact Form which disappear when the navigation bar is changed in terms of responsive design. I can't find the word for it right now, but basically the navigation bar is replaced by a navigation icon for mobile and tablet when the screen width is below 991px. (see CSS)
A better overview:
How it works:
The contact form can be opened by pressing "4" in the navigation bar. (The word is replaced with 4 in the PHP because this is in Norwegian. )
The contact form can also be opened by pressing "bestill foredrag!"
below the cover photo.
What works:
The contact form opens fine in both the nav bar and below the cover photo when the screen size is larger than 991px.
Below 991px: The contact form opens when I press the menu icon and then the list link.
What does not work:
Below 991px: The contact form is not being opened when I press "bestill foredrag!" below the cover photo.
CSS
/* Header */
.navbar-header {
width: 100%;
}
.navbar-header ul {
list-style-type: none;
margin: 0;
padding: 0;
}
.navbar-header li {
display: inline;
}
.navbar-inverse {
background-color: white;
border-color: white;
}
#navbar-brand-cont {
padding-top: 5px;
}
.navbar-brand img {
height: 22px;
}
#header_menu ul {
list-style-type: none;
margin: 0;
padding-bottom: 10px;
margin-top: 17px;
}
#header_menu li {
display: inline;
margin-left: 30px;
margin-right: 30px;
}
#header_menu li a {
color: #000;
text-decoration: none;
}
#header_menu li a:hover {
color: #99cc66;
}
#media only screen and (min-width: 992px) and (max-width: 1200px) {
#header_menu li {
margin-left: 10px;
margin-right: 10px;
}
}
/*Hide dropdown links until they are needed*/
#header_menu li ul {
display: none;
}
/*Make dropdown links vertical*/
#header_menu li ul li {
display: block;
float: none;
}
/*Prevent text wrapping*/
#header_menu li ul li a {
width: auto;
min-width: 100px;
padding: 0 20px;
}
/*Display the dropdown on hover*/
#header_menu ul li a:hover + .hidden, .hidden:hover {
display: block;
}
/*Style 'show menu' label button and hide it by default*/
#header_menu .show-menu {
text-decoration: none;
color: #fff;
text-align: center;
padding: 10px 0;
display: none;
}
/*Hide checkbox*/
#header_menu input[type=checkbox]{
display: none;
}
/*Show menu when invisible checkbox is checked*/
#header_menu input[type=checkbox]:checked ~ #menu{
display: block;
}
/*Responsive Styles*/
#media screen and (max-width : 991px){
/*Make dropdown links appear inline*/
#header_menu ul {
position: static;
display: none;
padding-left: 0px;
}
/*Create vertical spacing*/
#header_menu li {
margin-bottom: 10px;
clear: both;
display: block;
margin-left: 0px;
margin-right: 0px;
}
/*Make all menu links full width*/
#header_menu ul li, li a {
width: 100%;
clear: both;
}
/*Display 'show menu' link*/
#header_menu .show-menu {
display:block;
}
.stortest {
font-size: 18px;
}
}
#myModal {
opacity: 1;
filter: alpha(opacity=100); /* For IE8 and earlier */
}
.modal-open {
padding-right: 0!important;
}
.modal-content, .modal-dialog {
opacity: 1;
filter: alpha(opacity=100); /* For IE8 and earlier */
text-align: left;
margin-top: 60px;
}
.modal {
position: fixed;
right: o;
top: 60px;
}
.modal-header {
background: black;
color: grey;
}
.modal-header .close {
color: #99cc66 !important;
text-shadow: 0px 0px;
}
.modal-header a:link {
color: #99cc66 !important;
}
.modal-body {
background: #99cc66;
text-align: left;
}
.btn {
background: none;
}
.popover {
background-color: #black;
color: #black;
width: 250px;
}
.popover.right .arrow:after {
border-right-color: #black;
}
.input-group[class*="col-"] {
padding-right: 15px;
padding-left: 15px;
}
.btn btn-custom pull-bottom {
background-color: #99cc66;
}
h4.modal-title {
color: #99cc66;
margin-bottom:20px;
}
li.popupp {
opacity: 1;
filter: alpha(opacity=100); /* For IE8 and earlier */
}
/* Sosiale ikoner */
#icon-bar-holder {
float: right;
}
#icon-bar-holder ul {
padding-bottom: 0px;
margin-top: 0px;
}
#icon-bar-holder li {
list-style-type: none;
margin-left: 0;
margin-right: 0;
}
#iconbar-left, #iconbar-right {
width: 50px;
height: 50px;
}
#icon-bar-left, #icon-bar-left:hover, #icon-bar-right, #icon-bar-right:hover {
width: 30px;
height: 30px;
background-size: 30px auto;
display: inline-block;
}
#icon-bar-left {
background: url(img/ikoner/twitter_hover.png) no-repeat top left;
background-size: 30px auto;
}
#icon-bar-left:hover {
background: url(img/ikoner/twitter.png) no-repeat top left;
background-size: 30px auto;
}
#icon-bar-right {
background: url(img/ikoner/facebook_hover.png) no-repeat top left;
background-size: 30px auto;
}
#icon-bar-right:hover {
background: url(img/ikoner/facebook.png) no-repeat top left;
background-size: 30px auto;
}
#media screen and (max-width : 365px) {
#icon-bar img {
display: none;
}
}
#media screen and (max-width : 450px) {
.navbar-brand img {
height: 18px;
}
#icon-bar img {
margin-top: 0px;
width: 20px;
}
}
#media only screen and (min-width: 100px) and (max-width: 450px) {
.navbar-header {
margin: 0;
}
}
#media only screen and (min-width: 100px) and (max-width: 450px) {
.navbar-header{
margin-left: 0;
margin-right: 0;
}
#header_menu {
margin-top: 4px;
}
}
#media only screen and (min-width: 451px) and (max-width: 991px) {
#header_menu {
margin-top: 8px;
}
}
PHP - Navigation bar
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<div id="navbar-brand-cont">
<a class="navbar-brand" href="http://sookvisuals.com/dev/innbokskontroll">
<img src="<?php bloginfo('stylesheet_directory'); ?>/img/innbokskontroll.png">
</a>
</div>
<div id="header_menu">
<label for="show-menu" class="show-menu"><img src=<?php bloginfo('stylesheet_directory'); ?>/img/ikoner/innbokskontroll_nav_menu.png height="15px"></label>
<input type="checkbox" id="show-menu" role="button">
<ul id="menu">
<li><a href="http://sookvisuals.com/dev/innbokskontroll/laer-innbokskontroll/" class="stortest btn btn-custom" >1</a></li>
<li>2</li>
<li>3</li>
<li class="popupp">
4
<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Bestill<br/>foredrag</h4>
<p>Text</p>
<p>Text</p>
</div>
<div class="modal-body">
<form class="form-horizontal" name="commentform" method="post" action="send_form_email.php">
<div class="form-group">
<div class="col-md-6 input-group">
<input type="email" class="form-control" id="email" name="email" placeholder="E-post"/>
</div>
</div>
<div class="form-group">
<div class="col-md-9">
<textarea rows="8" class="form-control" id="comments" name="comments" placeholder="melding"></textarea>
</div>
<div class="col-md-2">
<button type="submit" value="Submit" class="btn btn-custom pull-right" id="send_btn"><img src="<?php bloginfo('stylesheet_directory'); ?>/img/ikoner/pil_h_ny.png"></button>
</div>
</div>
</form>
</div><!-- End of Modal body -->
</div><!-- End of Modal content -->
</div><!-- End of Modal dialog -->
</div><!-- End of Modal -->
<?php
// here comes the form - removed because it does not have any affect on this question.
?>
<script>
$('#send_btn').popover({content: 'Takk for henvendelsen! Din melding blir sendt nå.'},'click');
</script>
</li>
<div id="icon-bar-holder">
<ul>
<li id="iconbar-left">
<a href="http://facebook.com/innbokskontroll" target="blank">
<span id="icon-bar-left">
</span>
</a>
<li id="iconbar-right">
<a href="http://twitter.com/jkippers" target="_blank">
<span id="icon-bar-right">
</span>
</a>
</li>
</ul>
</div>
</ul>
</div>
</div>
</nav>
PHP - Below the cover photo
<div id="bestill_lear_forside" class="row">
<a href="#myModal" role="button" class="btn btn-custom" data-toggle="modal">
<div id="bestill_forside" class="col-sm-6 svart">
<div class="pull-right vertical-center half-content-wrapper" style="width: 100%;margin-right: 80px">
<img class="pull-left" src="<?php bloginfo('stylesheet_directory'); ?>/img/ikoner/pil_v.png">
<span class="pull-right bestill_forside_venstre">Bestill foredrag!</span>
</div>
</div>
</a>
<a href="http://sookvisuals.com/dev/innbokskontroll/laer-innbokskontroll/" target="_self">
<div id="lear_forside" class="col-sm-6 hvit">
<div class="pull-left vertical-center half-content-wrapper" style="width: 100%;margin-left: 80px">
<img class="pull-right" src="<?php bloginfo('stylesheet_directory'); ?>/img/ikoner/pil_h_ny.png">
<span class="bestill_forside_hoyre">Lær innbokskontroll!</span>
</div>
</div>
</a>
</div>
Any ideas? Ask if there are any confusions. I was going to post screenshots, but Photoshop stopped working...
Just for clarification - are both divs .modal and .modal-dialog not showing on <991px? I'm seeing a few issues here -
Modals should not be nested within list items; try removing this code
<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Bestill<br/>foredrag</h4>
<p>Text</p>
<p>Text</p>
</div>
<div class="modal-body">
<form class="form-horizontal" name="commentform" method="post" action="send_form_email.php">
<div class="form-group">
<div class="col-md-6 input-group">
<input type="email" class="form-control" id="email" name="email" placeholder="E-post"/>
</div>
</div>
<div class="form-group">
<div class="col-md-9">
<textarea rows="8" class="form-control" id="comments" name="comments" placeholder="melding"></textarea>
</div>
<div class="col-md-2">
<button type="submit" value="Submit" class="btn btn-custom pull-right" id="send_btn"><img src="<?php bloginfo('stylesheet_directory'); ?>/img/ikoner/pil_h_ny.png"></button>
</div>
</div>
</form>
</div><!-- End of Modal body -->
</div><!-- End of Modal content -->
</div><!-- End of Modal dialog -->
</div><!-- End of Modal -->
from the navigation bar list item and moving it to the main container, so it isn't hidden by the collapse of the menu on mobile sizes.
Also try adding sm and xs column classes (i.e. col-sm-9, col-xs-9) to your modal for more control on the mobile version. And finally, in
.modal {
position: fixed;
right: o;
top: 60px;
}
right:o; should be right:0.

HTML Text Error in jQuery SlideShow

I have been working on a slideshow for my school website, you can see that here. Although the text that appears under the photo, the two lines are two closed together, and the css that I have used hasn't worked.
The CSS is:
#slider {
width: 1047px; /* important to be same as image width */
height: 350px; /* important to be same as image height */
max-height: 350px;
position: relative; /* important */
overflow: hidden; /* important */
}
#sliderContent {
width: 1047px; /* important to be same as image width or wider */
position: absolute;
top: 0;
margin-left: 0;
}
.sliderImage {
float: left;
position: relative;
display: none;
}
.sliderImage span {
position: absolute;
font: 16px/16px Arial, Helvetica, sans-serif;
padding: 10px 13px;
width: 1047px;
background-color: #000;
filter: alpha(opacity=70);
-moz-opacity: 0.7;
-khtml-opacity: 0.7;
opacity: 0.7;
color: #fff;
display: none;
}
.clear {
clear: both;
}
.sliderImage span strong {
font-size: 20px;
}
p.sliderDesc{
padding-top: 5px;
}
.top {
top: 0;
left: 0;
}
.bottom {
bottom: 0;
left: 0;
}
ul { list-style-type: none;}
And the HTML for the slider is:
<div id="slider">
<ul id="sliderContent">
<li class="sliderImage">
<img src="slider_images/image1-5.jpg" alt="1" /><!--Image Courtesy Of Wikipedia | http://upload.wikimedia.org/wikipedia/commons/e/e1/Little_Rock_Central_High_School.jpg-->
<span class="bottom"><strong>Welcome to Beautiful Little Rock Central High! </strong><br />Content text...</span>
</li>
<li class="sliderImage">
<img src="slider_images/image2.jpg" alt="2" />
<span class="bottom"><strong>National Historic Site & Museum</strong><br /BLAH!!!</span>
</li>
<li class="sliderImage">
<img src="slider_images/image3-5.jpg" alt="3" />
<span class="bottom"><strong>No state shall make or enforce any law which shall abridge the privileges or immunities of citizens of the United States.</strong><br />Fourteenth Amendment </span>
</li>
<li class="sliderImage">
<img src="slider_images/image4-5.jpg" alt="4" />
<span class="bottom"><strong>Title text 2</strong>
<br />
<p class="sliderDesc">Content text...</p>
</span>
</li>
<!--<li class="sliderImage">
<img src="slider_images/410/5.jpg" alt="5" />
<span class="bottom"><strong>Title text 2</strong><br />Content text...</span>
</li>-->
<div class="clear sliderImage"></div>
</ul>
</div>
<!-- // slider -->
Thanks! I hope this is a simple fix. Thanks.
Okay I found the solution to this problem, apparently the quick and easy solution is to make a class that I called "sliderDesc" and I used it in this way:
<span class="bottom"><strong>National Historic Site & Museum</strong><br /><p class="sliderDesc">Content text...</p></span>
And that resulted in this: lrch.harrisonbh.com

Categories