I've got a problem : when i try to move the cursor of the mouse on the sub-menu of the drop down, for some motive it disappier.
I try to check in file css end in its file js but at the third day again i didn't find the solutions..i think that could be some problem with [block] in class css. does someone see if there something that wrong end eventually how could operate to resolve this problem? under here post an image with the code.
Thank in advance.
Here another image...maybe understanding better:
here the code about the top-link :
/* ======================================================================================= */
--> .top-link { background: #f7f7f7;line-height: 35px; position: relative;color: #6a6a6a; border-bottom: 1px solid #d8d8d8;}
.form-language, .form-currency { float: left;}
.form-language label { display: none;}
.form-language select, .form-currency select { padding: 4px 10px; background: #f2f2f2;}
p.welcome-msg { margin: 0 0 0 25px; float:left; padding: 5px 0;}
.top-link ul.links { padding: 5px 0;}
.top-link ul.links li { padding:0 15px 0 0; float: left;}
.top-link ul.links li a { color: #6a6a6a;font-size: 11px;text-transform: uppercase; }
.top-link ul.links li a:hover { }
.call-phone{text-align: right;}
.call-phone span{color:#999;font-weight: bold;}
here the code about bottom Drop down :
.drop-lang {
list-style: none;
padding: 0;
margin: 0;float: right;
}
.drop-lang .drop-trigger {
position: relative;
z-index: 9999;
float: right;
padding: 0 5px 0 10px;
}
.drop-lang li a {
position: relative;
padding: 5px 0 5px 0;
display: block;
color: #6a6a6a;
text-transform:uppercase;
font-weight: normal;
font-size: 11px;
z-index: 9999;
}
.drop-lang .drop-trigger .sub-lang {
position: absolute;
top:40px;
left:-1px; /* dropdown left or right */
list-style: none;
padding:0 11px 0 4px;
margin: 0;
display: none;
background: #f7f7f7;
border: 1px solid #d8d8d8;
border-top: none
z-index: 9999;
}
.drop-lang .drop-trigger:hover .sub-lang {
top:45px;
display: block;
}
.drop-lang .sub-lang li a { padding: 0 5px; line-height: 22px; display: block; color: #666; text-transform:uppercase; font-weight: normal; font-size: 11px; border-top: 1px solid #d8d8d8; border-right:0;border-left:0; border-bottom:0; border-radius:0;}
.drop-lang .sub-lang li a:hover { }
Html/php part :
<?php if(count($this->getStores())>1): ?>
<div class="form-language">
<label for="select-language"><?php echo $this->__('Language:') ?></label>
<ul class="drop-lang">
<li class="drop-trigger">
<?php foreach ($this->getStores() as $_lang): ?>
<?php if($_lang->getId() == $this->getCurrentStoreId()): ?>
<a class="<?php echo $_lang->getCode() ?>" href="<?php echo $_lang->getCurrentUrl() ?>"><?php echo $this->htmlEscape($_lang->getName()) ?><i class="fa fa-angle-down"></i></a>
<?php endif?>
<?php endforeach; ?>
<ul class="sub-lang">
<?php foreach ($this->getStores() as $_lang): ?>
<?php $_selected = ($_lang->getId() == $this->getCurrentStoreId()) ? ' class="selected"' : '' ?>
<li><a class="<?php echo $_lang->getCode() ?>" href="<?php echo $_lang->getCurrentUrl() ?>"<?php //echo $_selected; ?>><?php echo $this->htmlEscape($_lang->getName()) ?></a></li>
<?php endforeach; ?>
</ul>
</li>
</ul>
</div>
<?php endif; ?>
Try the fiddle at - https://jsfiddle.net/456f2sf7/
.drop-lang .drop-trigger:hover .sub-lang {
top:20px;//Updated value
display: block;
}
Just decreasing the top margin to 20px, ensures that the dropdown does not disappear as it is visible only on hover.
Related
Hello i am making my own wordpress bootstrap theme. And i have one thing what i want to make that it work nice on mobile and tablets. Right now in mobile mode my site Title in mixed together with my info box. I think it would be nice if i could move my text box under the text box when the page is visited on smaller screens.
You can see my problem in image:
My HTML:
<div class="container">
<div class="wrapper">
<h1>
<?php
if(get_theme_mod( 'header_banner_title_setting' )){
echo get_theme_mod( 'header_banner_title_setting' );
}else{
echo 'Wordpress + Bootstrap';
}
?>
</h1>
<p>
<?php
if(get_theme_mod( 'header_banner_tagline_setting' )){
echo get_theme_mod( 'header_banner_tagline_setting' );
}else{
echo esc_html__('To customize the contents of this
header banner and other elements of your site, go to D
ashboard > Appearance >
Customize','wp-bootstrap-starter');
}
?>
</p>
<div id="headertxt">
<a>Zvani - <span class="head"> (+371) 29429748</span><br />
</a>
<a href="mailto:godeli#tvnet.lv">Raksti - <span
class="head_2">godeli#tvnet.lv</span><br /></a>
<a href="/ka-mus-atrast/">Redzi mūs <span
class="head_2">kartē</span><br /></a>
<a><span class="head">57°11'58.4"N 22°12'11.2"E</span><br />
</a>
<hr>
<a href="./rekviziti/"><span
class="head_2">REKVIZĪTI</span></a>
</div>
</div>
<a href="#content" class="page-scroller"><i class="fa fa-fw fa-
angle-down"></i></a>
</div>
</div>
CSS :
header#masthead {
margin-bottom: 0;
background-color: #563d7c ;
box-shadow: 0 0.5rem 1rem rgba(0,0,0,.05), inset 0 -1px 0 rgba(0,0,0,.1);
padding: .60rem 1rem;
border-bottom: 1px solid #9175bb ;
position: fixed;
z-index: 2000;
width: 100%;
}
.navbar-brand > a {
color: rgba(0, 0, 0, 0.9);
font-size: 1.1rem;
outline: medium none;
text-decoration: none;
color: #fff;
font-weight: 700;
}
.navbar-brand > a:visited, .navbar-brand > a:hover {
text-decoration: none;
}
#page-sub-header {
position: relative;
padding-top: 15rem;
padding-bottom: 0;
text-align: center;
font-size: 1.25rem;
background-size: cover !important;
}
#page-sub-header h1 {
line-height: 1;
text-align: left;
font-size: 4rem;
color: #563e7c;
margin: 0 0 1rem;
border: 0;
padding: 0;
}
#page-sub-header p {
margin-bottom: 0;
text-align: left;
line-height: 1.4;
font-size: 1.25rem;
font-weight: 300;
color: #563e7c;
}
a.page-scroller {
color: #333;
font-size: 2.6rem;
display: inline-block;
margin-top: 2rem;
}
#media screen and (min-width: 768px) {
#page-sub-header h1 {
font-size: 3.750rem;
line-height: 1;
}
#page-sub-header {
font-size: 1.25rem;
}
}
#media screen and (min-width: 992px) {
#page-sub-header p {
max-width: 43rem;
margin: 0 auto;
}
}
#headertxt {
position: absolute;
right: 20px;
bottom: 100px;
background-size: auto;
background: rgba(0, 0, 0, 0.7);
padding: 10px 10px 10px 10px;
}
#headertxt a {
text-align: right;
color: white;
font-size: 20px;
}
I hope someone will lead me to some way how to fix this problem and points me to some good tip. Thanks!
I have this code i use for my website to display text and a button:
<?php if ($slide1 != null ) : ?><li><img src="<?php echo $this->baseurl ?>/<?
php echo htmlspecialchars($slide1); ?>" /><p class="caption">
<?php echo ($slidedesc1); ?>Meer info</p></li>
Right now the entire thing is displayed as a button with the class "caption". I only want class "caption" to be aplied on "Meer info" and not to "$slidedesc1". How would I do that? Do I change the position of class?
Caption properties:
.callbacks .caption {
color: #fff;
display: block;
font-size: 45px;
max-width: none;
position: absolute;
text-align: center;
text-shadow: 0 0 1px #555;
top: 20%;
width: 100%;
z-index: 2;
}
.callbacks .caption a {
background-color: #3498DB;
border-bottom: 5px solid #2980B9;
position: relative;
padding: 10px 40px;
margin: 0px 10px 10px 0px;
border-radius: 10px;
font-family: 'Pacifico', cursive;
font-size: 25px;
color: #FFF !important;
text-decoration: none;
z-index:11;
}
.callbacks .caption a:hover
{background: #555; border-bottom: 5px solid #000; text-decoration:none;}
.callbacks .caption a:active
{
transform: translate(0px,5px);
-webkit-transform: translate(0px,5px);
border-bottom: 5px solid #333;
transition: all 0.1s;
-webkit-transition: all 0.1s;
background-color: #444;
}
try this code :
<?php if ($slide1 != null ) : ?><li><img src="<?php echo $this->baseurl ?>/<?
php echo htmlspecialchars($slide1); ?>" /><p>
<?php echo ($slidedesc1); ?><span class="caption">Meer info</span></p></li>
Does this work?
<?php
if ($slide1 != null ) {
echo "
<li>
<img src='".$this->baseurl."'".htmlspecialchars($slide1) ."/>
<p>
<a href='/algemene-informatie'>
$slidedesc1
<label class='caption'>
Meer info
</label>
</a>
</p>
</li>
"
?>
I am trying to add addtional tabs whenever a new item is added to the database it is supposed to show on the webpage and display the new item without having to go into the code just having to add to the database i tried $_GET variable to try id but that did not work.
CODE:
<?php
$sql = "SELECT * FROM pages WHERE id = " . $_GET['id'];
$result = mysqli_query($db, $sql);
while ($pages = mysqli_fetch_assoc($result)) {
?>
<ul class="tabs">
<li>
<input type="radio" name="tabs" id="tab1" checked />
<label for="tab1"><?php echo $pages['name']; ?></label>
<div id="tab-content" class="tab-content">
<p><?php echo $pages['content']; ?></p>
</div>
</li>
</ul>
<?php } ?>
CSS CODE:
h1 {
font-weight: normal;
font-size: 40px;
font-weight: normal;
text-transform: uppercase;
float: left;
margin: 20px 0 100px 10px;
span {
font-size: 13px;
display: block;
padding-left: 4px;
}
}
.tabs {
width: 650px;
float: none;
list-style: none;
position: relative;
margin: 80px 0 0 10px;
text-align: left;
}
li {
float: left;
display: block;
}
input[type="radio"] {
position: absolute;
top: -9999px;
left: -9999px;
}
label {
display: block;
padding: 14px 21px;
border-radius: 2px 2px 0 0;
font-size: 20px;
font-weight: normal;
text-transform: uppercase;
background: $tabs-base-color;
cursor: pointer;
position: relative;
top: 4px;
#include transition(all 0.2s ease-in-out);
&:hover {
background: darken($tabs-base-color, 10);
}
}
.tab-content{
z-index: 2;
display: none;
overflow: hidden;
width: 100%;
font-size: 17px;
line-height: 25px;
padding: 25px;
position: absolute;
top: 53px;
left: 0;
background: darken($tabs-base-color, 15);
}
//The Magic
[id^="tab"]:checked + label {
top: 0;
padding-top: 17px;
background: darken($tabs-base-color, 15);
}
[id^="tab"]:checked ~ [id^="tab-content"] {
display: block;
}
}
p.link {
clear: both;
margin: 380px 0 0 15px;
a {
text-transform: uppercase;
text-decoration: none;
display: inline-block;
color: #fff;
padding: 5px 10px;
margin: 0 5px;
background-color: darken($tabs-base-color, 15);
#include transition(all 0.2s ease-in);
&:hover {
background-color: darken($tabs-base-color, 20);
}
}
}
<?php
$id=$_GET['id'];
$sql = "SELECT * FROM pages WHERE id ='$id'";
$result = mysqli_query($db, $sql);
while ($pages = mysqli_fetch_assoc($result)) {
?>
<ul class="tabs">
<li>
<input type="radio" name="tabs" id="tab1" checked />
<label for="tab1"><?php echo $pages['name']; ?></label>
<div id="tab-content" class="tab-content">
<p><?php echo $pages['content']; ?></p>
</div>
</li>
</ul>
<?php } ?>
Try This Code not sure but try..
I am trying to create a forum software and I would like when my breadcrumb links, change depending on what I clicked:
And:
Here is how my files are coordinated:
header.php, index.php, members.php, css/style.css
I would like that the element automatically changes according to the clicked page.
header.php code:
<div id="top_bar">
<div class="wrapper">
<div id="top_bar_links">
<ul>
<?php
$full_name = $_SERVER["PHP_SELF"];
$name_array = explode("/",$full_name);
$count = count($name_array);
$page_name = $name_array[$count-1];
?>
<li>
<a class="<?php echo ($page_name=="index.php")?"active":"";?>" href="index.php">Forums</a>
</li>
<li>
<a class="<?php echo ($page_name=="members.php")?"active":"";?>" href="members.php">Members</a>
</li>
</ul>
</div>
</div>
</div>
<div id="header">
<div class="wrapper">
<h1 id="logo">
NextGenFocus
</h1>
<div id="user_links">
<ul>
<li id="sign_up">
Sign Up
</li>
<li id="sign_in">
Sign In
</li>
</ul>
</div>
</div>
</div>
<div class="wrapper">
<div id="container">
<div id="breadcrumb_top">
<div class="breadcrumb_links">
<ul>
<li class="forums">
Forums
</li>
</ul>
</div>
</div>
</div>
</div>
index.php and members.php code:
<?php
include "header.php";
?>
style.css code:
/* CORE */
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
margin: 0;
}
h1 {
font-size: 25px;
}
h2 {
font-size: 20px;
}
h3 {
font-size: 18px;
}
h4 {
font-size: 17px;
}
h5 {
font-size: 15px;
}
h6 {
font-size: 13px;
}
body {
background-color: #e6e9ed;
color: #000;
font-family: "Trebuchet MS", sans-serif;
font-size: 13px;
margin: 0;
padding-bottom: 15px;
}
.wrapper {
width: 980px;
margin: 0 auto;
}
a {
color: #4d7799;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
p {
margin: 0;
}
/* TOP BAR */
#top_bar {
background-color: #262d35;
height: 55px;
}
#top_bar_links ul {
list-style: none;
margin: 0;
padding: 0;
}
#top_bar_links a {
color: #fff;
opacity: 0.6;
float: left;
display: block;
line-height: 55px;
padding: 0 25px;
}
#top_bar_links a:hover {
background-color: #000;
opacity: inherit;
text-decoration: none;
}
#top_bar_links a.active {
background-color: #000;
opacity: inherit;
}
#top_bar_links a:hover {
background-color: #000;
opacity: inherit;
text-decoration: none;
}
/* HEADER */
#header {
background-color: #3d5e78;
height: 115px;
margin-bottom: -25px;
}
#logo {
float: left;
}
#logo a {
color: #fff;
font-size: 25px;
line-height: 90px;
}
#logo a:hover {
text-decoration: none;
}
#user_links li {
float: right;
}
#user_links ul {
list-style: none;
margin: 0;
padding: 0;
}
#user_links a {
color: #fff;
line-height: 90px;
margin-left: 15px;
}
/* CONTAINER */
#container {
background-color: #fff;
box-shadow: rgba(0,0,0,0.3) 0px 1px 7px;
padding: 15px;
}
#breadcrumb_top {
background-color: #f5f5f5;
height: 45px;
margin: -15px -15px 15px -15px;
}
#breadcrumb_bottom {
background-color: #f5f5f5;
height: 45px;
margin: 0 -15px -15px -15px;
}
.breadcrumb_links ul {
list-style: none;
margin: 0;
padding: 0;
}
.breadcrumb_links li {
float: left;
}
.breadcrumb_links a {
color: #000;
line-height: 45px;
margin-left: 15px;
}
.separator {
margin-left: 10px;
}
It seems you need to put something dynamic where you presently have 'Forums'. You have your pagename (members.php) in the variable $page_name, so try this:
<?php echo ucfirst(str_replace('.php', '', $page_name)) ?>
That will remove the ".php" from the string (so it turns into "members") and then upper-case the first letter (so it turns into "Members"). Don't be afraid to try out some other string operations if you need to adjust it further!
I am not able to make the sidebar all the way touch to the footer earlier it was going to the bottom but i made few changes for hours and suddenly when i checked it sidebar color only shows till it displays some links.
css:
*{margin:0; padding:0;}
html{ width:1024px; height:100%; margin: 0 auto; }
body{ width:100%;height:100%;
margin:0; padding:0; border:0;
font-family:Verdana,Helvetica,Arial,sans-serif;
font-size: 13px; line-height: 16px;
background: #FFFFFF; text-align: center;
display: table;
}
#main { height:auto; min-height:100%; }
/* header */
#header{
background-color:#c42000;
height:75px; margin:0; padding:0;
border:0 solid;
}
#header h1{
line-height:15px; padding:1em;
}
#header h1 a{
color:#FFFFFF;
text-decoration:none;
}
#header h1 a:hover {
color:#cda154;
}
/* Navigation */
#navigation {
color:#d3d3d3;
height:45px;
background:#262525;
float:top;
}
#navigation .subjects {
background: #262525;
float: left;
font-weight:bold;
margin: 0; padding: 0;
border-bottom: none;
}
#navigation .subjects li a, #navigation .subjects li {
float: left;
}
#navigation .subjects li {
list-style: none;
position: relative;
}
#navigation .subjects li a {
padding: 1em 2em;
text-decoration: none;
color: white;
background: #292929;
border-right: 1px solid #3c3c3c;
border-left: 1px solid #292929;
border-bottom: 1px solid #232323;
border-top: 1px solid #545454;
}
#navigation .subjects li a:hover {
background: #302f2f; color:#16a9e0;
}
/* Submenu */
#navigation .subjects li ul {
display: none;
pos
ition: absolute;
left: 0;
top: 100%;
padding: 0; margin: 0;
}
#navigation .subjects li:hover > ul {
display: block;
}
#navigation .subjects li ul li, #navigation.subjects li ul li a {
float: none;
}
#navigation .subjects li ul li {
_display: inline; /* for IE6 */
}
#navigation .subjects li ul li a {
width: 150px;
display: block;
}
/* Sidebar */
#sidebar {
float:right;
width: 150px; height: 100%;
margin: 0; padding: 0 2em;
color: #D4E6F4; background: #16aae2;
}
#sidebar a { color: #D4E6F4; text-decoration: none; }
#sidebar a:hover { color: #FFFFFF; }
/* footer */
#footer {
clear: both; position: relative;
height: 2em; margin: 0; padding: 1em; margin-top: -3em; z-index:10;
text-align: center;
background: #000000; color: #D4E6F4;
}
/* page */
#page {
display:table-cell;
float:left;
line-height: 30px;
text-align: left;
padding: 2em;
}
h2 { color:#c42000; }
div.message,div.error {
color: #8D0D19; font-weight:bold;
margin: 1em 0; padding: 1em;
}
div.images {
width:92;height:92; float:left; padding: 0 10px 0; display:block;
}
div.images a{ text-decoration:none;}
php:
<?php require_once("../includes/session.php"); ?>
<?php require_once("../includes/db_connection.php"); ?>
<?php require_once("../includes/functions.php"); ?>
<?php $layout_context = "admin"; ?>
<?php include("../includes/layouts/header.php"); ?>
<?php find_selected_page(); ?>
<div id="main">
<div id="navigation">
<?php echo navigation($current_subject, $current_page); ?>
</div>
<div id="page">
<?php echo message(); ?>
<?php if(isset($current_subject)) {?>
<h2>Manage Subject</h2>
Menu name: <?php echo htmlentities($current_subject["menu_name"]); ?><br />
Position: <?php echo $current_subject["position"]; ?><br />
Visible: <?php echo $current_subject["visible"] == 1 ? 'yes' : 'no'; ?><br /><br />
<a href="edit_subject.php?subject=<?php echo urlencode($current_subject["id"]); ?>
">Edit Subject</a>
<div style="margin-top: 2em; border-top: 1px solid #000000;">
<h2>Pages in this subject:</h2>
<?php
$subject_pages = find_pages_for_subject($current_subject["id"]);
while($page = mysqli_fetch_assoc($subject_pages)) {
$safe_page_id = urlencode($page["id"]);
echo "<a href=\"manage_content.php?page={$safe_page_id}\">";
echo htmlentities($page["menu_name"]);
echo "</a><br />";
}
?>
<br />
+ Add a new page to this subject
</div>
<?php }elseif($current_page) {?>
<h2>Manage Page</h2>
<?php ?>
Page Name: <?php echo htmlentities($current_page["menu_name"]); ?><br />
Position: <?php echo $current_page["position"]; ?><br />
Visible: <?php echo $current_page["visible"] == 1 ? 'yes' : 'no'; ?><br />
<br />
<br />
Edit Page<br /><br />
<?php echo display_image_by_id(); ?>
<?php }else { ?>
Please Select a Subject or Page.
<?php } ?>
</div>
<div id="sidebar">
« Main Menu
<br />
<br />
+ Add a subject
</div>
</div>
<?php include("../includes/layouts/footer.php"); ?>