I am building a departmental website and am running into a unique issue with my dock panel resizing incorrectly, but only with Chrome.
When I change the information inside the center of my dock panel to be something taller it expands correctly, but never resizes back down to fit shorter material. It works perfectly in firefox, IE and Spartan, but not in Chrome. It appears that it is setting the bottom-padding for the center instead of resizing the element.
Here's a link to 3 images on imgur that show the differences.
View post on imgur.com
Here's my code for creating the center container:
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui">
<ui:style>
</ui:style>
<g:HTMLPanel>
<g:DockPanel styleName="my-DockPanel">
<g:Dock direction="NORTH">
<g:HorizontalPanel width="750px" styleName="page-header">
<g:cell horizontalAlignment="ALIGN_LEFT">
<g:HTML>
</g:HTML>
</g:cell>
<g:cell horizontalAlignment="ALIGN_CENTER">
<g:Image url="Resources/Images/CSDepartment_Banner.gif" />
</g:cell>
</g:HorizontalPanel>
</g:Dock>
<g:Dock direction="SOUTH">
<g:HorizontalPanel styleName="page-footer">
<g:HTML>
</g:HTML>
<g:HTML>
<DIV align="center">
The Department of Computer Science
<br />
<br />
<br />
<br />
<br />
Last modified: July 1, 2015
<br />
<br />
</DIV>
</g:HTML>
<g:cell horizontalAlignment="ALIGN_RIGHT">
<g:HTML>
</g:HTML>
</g:cell>
</g:HorizontalPanel>
</g:Dock>
<g:Dock direction="EAST">
<g:VerticalPanel width="100%" height="100%">
</g:VerticalPanel>
</g:Dock>
<g:Dock direction="WEST">
<g:VerticalPanel width="100%" height="100%">
<g:Label>
</g:Label>
</g:VerticalPanel>
</g:Dock>
<g:Dock direction="NORTH">
<g:HorizontalPanel width="100%">
<g:cell horizontalAlignment="ALIGN_CENTER">
<g:MenuBar ui:field="navigationBar"></g:MenuBar>
</g:cell>
</g:HorizontalPanel>
</g:Dock>
<g:Dock direction="CENTER" width="1260px" height="100%">
<g:ScrollPanel height="auto">
<g:DeckPanel ui:field="deckPanel" height="100%">
</g:DeckPanel>
</g:ScrollPanel>
</g:Dock>
</g:DockPanel>
</g:HTMLPanel>
</ui:UiBinder>
And here's the CSS for the entire page:
#CHARSET "ISO-8859-1";
/**
* This file is linked through the index.html file
*/
body {
/*background-color: #CCCCCC !important;*/
background-color: #fff5ec;
font-family: "Garamond Premier Pro", "Myriad Pro", "Verdana",
"Times New Roman";
}
/*Adds a drop shadow at the top of the page and stays there.*/
body:before {
content: "";
position: fixed;
top: -10px;
left: 0;
width: 100%;
height: 10px;
-webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, .8);
-moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, .8);
box-shadow: 0px 0px 10px rgba(0, 0, 0, .8);
z-index: 100;
}
.my-dockPanel {
margin: 0;
padding: 0;
}
.my-dockPanel {
margin: 0px;
padding: 0px;
}
.my-DockPanel td {
padding: 0px;
margin: 0px;
}
.my-DockPanel {
height: 100%;
width: 100%;
border-spacing: 0px;
font-color: white;
}
.page-footer {
height: auto;
width: 1260px;
background-color: #003366;
padding: 0px;
margin: auto;
color: #FFF;
}
.page-header {
height: 100px;
/* display: block; */
margin-left: auto;
margin-right: auto;
}
.blog-title {
font-weight: bold;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
background: #555555;
}
.blog-panel {
border-top: 1px solid black;
padding: 2px;
margin-bottom: 6px;
}
.my-ScrollPane {
width: auto;
padding: 0px 0px 0px 0px;
min-height: 641px;
}
.gwt-MenuBar {
cursor: default;
}
.gwt-MenuBar .gwt-MenuItem {
cursor: default;
}
.gwt-MenuBar .gwt-MenuItem-selected {
/* background: #666; */
background: #335685;
color: #0cf;
}
.gwt-MenuBar-horizontal {
/* background: #222222; */
background: #003366;
border-radius: 55px 55px 0px 0px;
-moz-border-radius: 55px 55px 0px 0px;
-webkit-border-radius: 55px 55px 0px 0px;
border: 1px solid #000000;
}
.gwt-MenuBar-horizontal .gwt-MenuItem {
padding: 0px 10px;
vertical-align: bottom;
font-weight: bold;
color: #E0E0E0;
border-radius: 15px 15px 15px 15px;
-moz-border-radius: 15px 15px 15px 15px;
-webkit-border-radius: 15px 15px 15px 15px;
border-left: 2px solid #000000;
border-right: 2px solid #000000;
}
.gwt-MenuBar-horizontal .gwt-MenuItemSeparator {
width: 1px;
padding: 0px;
margin: 0px;
border: 0px;
border-left: 1px solid #bec7cc;
background: #000;
}
.gwt-MenuBar-horizontal .gwt-MenuItemSeparator .menuSeparatorInner {
width: 1px;
height: 1px;
background: #000;
}
.gwt-MenuBar-vertical {
margin-top: -5px;
margin-left: 0px;
padding-left: 2px;
/* background: #4D4D4D; */ /*background: #194775;*/
background: #003366;
color: #E0E0E0;
-webkit-box-shadow: 10px 10px 5px 0px rgba(0, 0, 0, 0.75);
-moz-box-shadow: 10px 10px 5px 0px rgba(0, 0, 0, 0.75);
box-shadow: 10px 10px 5px 0px rgba(0, 0, 0, 0.75);
border-left: 1px solid #000000;
border-right: 1px solid #000000;
border-bottom: 1px solid #000000;
opacity: 0.9;
}
.gwt-MenuBar-vertical table {
border-collapse: collapse;
}
.gwt-MenuBar-vertical .gwt-MenuItem {
padding: 4px 14px 4px 1px;
}
.gwt-MenuBar-vertical .gwt-MenuItemSeparator {
padding: 2px 0px;
}
.gwt-MenuBar-vertical .gwt-MenuItemSeparator .menuSeparatorInner {
height: 1px;
padding: 0px;
border: 0px;
border-top: 1px solid #bec7cc;
background: #222;
overflow: hidden;
}
.gwt-MenuBar-vertical .subMenuIcon {
padding-right: 4px;
}
.gwt-MenuBar-vertical .subMenuIcon-selected {
/* background: #666; */
background: #335685;
}
.gwt-MenuBarPopup {
margin: 0px 0px 0px 3px;
}
.gwt-MenuBarPopup .menuPopupTopCenter {
background: url(images/hborder.png) 0px -12px repeat-x;
}
.gwt-MenuBarPopup .menuPopupBottomCenter {
background: url(images/hborder.png) 0px -13px repeat-x;
-background: url(images/hborder_ie6.png) 0px -13px repeat-x;
}
.gwt-MenuBarPopup .menuPopupMiddleLeft {
background: url(images/vborder.png) -12px 0px repeat-y;
-background: url(images/vborder_ie6.png) -12px 0px repeat-y;
}
.gwt-MenuBarPopup .menuPopupMiddleRight {
background: url(images/vborder.png) -13px 0px repeat-y;
-background: url(images/vborder_ie6.png) -13px 0px repeat-y;
}
.gwt-MenuBarPopup .menuPopupTopLeftInner {
width: 5px;
height: 5px;
zoom: 1;
}
.gwt-MenuBarPopup .menuPopupTopRightInner {
width: 8px;
height: 5px;
zoom: 1;
}
.gwt-MenuBarPopup .menuPopupBottomLeftInner {
width: 5px;
height: 8px;
zoom: 1;
}
.gwt-MenuBarPopup .menuPopupBottomRightInner {
width: 8px;
height: 8px;
zoom: 1;
}
.gwt-MenuBarPopup .menuPopupTopLeft {
background: url(images/corner.png) no-repeat 0px -36px;
-background: url(images/corner_ie6.png) no-repeat 0px -36px;
}
.gwt-MenuBarPopup .menuPopupTopRight {
background: url(images/corner.png) no-repeat -5px -36px;
-background: url(images/corner_ie6.png) no-repeat -5px -36px;
}
.gwt-MenuBarPopup .menuPopupBottomLeft {
background: url(images/corner.png) no-repeat 0px -41px;
-background: url(images/corner_ie6.png) no-repeat 0px -41px;
}
.gwt-MenuBarPopup .menuPopupBottomRight {
background: url(images/corner.png) no-repeat -5px -41px;
-background: url(images/corner_ie6.png) no-repeat -5px -41px;
}
* html .gwt-MenuBarPopup .menuPopupTopLeftInner {
width: 5px;
height: 5px;
overflow: hidden;
}
* html .gwt-MenuBarPopup .menuPopupTopRightInner {
width: 8px;
height: 5px;
overflow: hidden;
}
* html .gwt-MenuBarPopup .menuPopupBottomLeftInner {
width: 5px;
height: 8px;
overflow: hidden;
}
* html .gwt-MenuBarPopup .menuPopupBottomRightInner {
width: 8px;
height: 8px;
overflow: hidden;
}
.blog_image {
padding: 1px;
margin: 0px 20px 0px 20px;
border: 0px solid #021a40;
/* width:300px; */
/* height:auto; */
}
.staff-image {
padding: 1px;
margin: 0px 20px 0px 0px;
border: 0px solid #021a40;
width: auto;
height: 200px;
}
.staff-information {
width: 1260px;
height: 230px;
/* border: 20px solid #021a40; */ /* margin: 0px 0px 25px 0px; */
border-radius: 9px 9px 9px 9px;
-moz-border-radius: 9px 9px 9px 9px;
-webkit-border-radius: 9px 9px 9px 9px;
border-top: 2px solid #000000;
border-left: 2px dashed #000000;
border-right: 2px dashed #000000;
}
.staff-information-west {
/* background-color: #000000; */
font-weight: bold;
margin-left: auto;
margin-right: auto;
width: 315px;
}
.staff-information-east {
margin-left: auto;
margin-right: auto;
width: 315px;
horizontal-align: left;
}
.featured-item-1 {
border-left: 3px solid #003366;
border-top: 3px solid #003366;
}
.featured-item-2 {
border-left: 3px solid #003366;
border-right: 3px solid #003366;
border-top: 3px solid #003366;
}
.featured-item-3 {
border-right: 3px solid #003366;
border-top: 3px solid #003366;
}
.featured-title {
width: 406px;
text-transform: uppercase;
padding-left: 10px;
}
.featured_image {
/* padding-left: 10px; */ /* margin: 0px 0px 0px 10px; */
width: 130px;
height: 130px;
-webkit-box-shadow: 10px 10px 20px 1px rgba(0, 51, 102, 1);
-moz-box-shadow: 10px 10px 20px 1px rgba(0, 51, 102, 1);
box-shadow: 10px 10px 20px 1px rgba(0, 51, 102, 1);
}
.featured-body {
width: 216px;
height: auto;
font-size: 15px;
padding-left: 15px;
}
.myButton {
-moz-box-shadow: inset 0px 1px 0px 0px #7a8eb9;
-webkit-box-shadow: inset 0px 1px 0px 0px #7a8eb9;
box-shadow: inset 0px 1px 0px 0px #7a8eb9;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #637aad
), color-stop(1, #5972a7));
background: -moz-linear-gradient(top, #637aad 5%, #5972a7 100%);
background: -webkit-linear-gradient(top, #637aad 5%, #5972a7 100%);
background: -o-linear-gradient(top, #637aad 5%, #5972a7 100%);
background: -ms-linear-gradient(top, #637aad 5%, #5972a7 100%);
background: linear-gradient(to bottom, #637aad 5%, #5972a7 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#637aad',
endColorstr='#5972a7', GradientType=0);
background-color: #637aad;
border: 1px solid #314179;
display: inline-block;
cursor: pointer;
color: #ffffff;
font-family: Arial;
font-size: 28px;
font-weight: bold;
padding: 32px 76px;
text-decoration: none;
}
.myButton:hover {
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #5972a7
), color-stop(1, #637aad));
background: -moz-linear-gradient(top, #5972a7 5%, #637aad 100%);
background: -webkit-linear-gradient(top, #5972a7 5%, #637aad 100%);
background: -o-linear-gradient(top, #5972a7 5%, #637aad 100%);
background: -ms-linear-gradient(top, #5972a7 5%, #637aad 100%);
background: linear-gradient(to bottom, #5972a7 5%, #637aad 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5972a7',
endColorstr='#637aad', GradientType=0);
background-color: #5972a7;
}
.myButton:active {
position: relative;
top: 1px;
}
.html-clicked {
background: url("Resources/Images/Widgets/things.png") repeat scroll 0 0
transparent;
height: 68px;
list-style: none outside none;
margin: 0;
line-height: 63px;
padding-left: 25px;
color: #fff;
font-family: georgia;
font-weight: bold;
font-size: 13px;
cursor: pointer;
}
.html-unclicked {
background: url("Resources/Images/Widgets/things.png") repeat scroll 0
-66px transparent;
height: 68px;
list-style: none outside none;
margin: 0;
line-height: 63px;
padding-left: 25px;
color: #23438a;
font-family: georgia;
font-weight: bold;
font-size: 13px;
cursor: pointer;
}
This is the last major issue holding me back from pushing this to production (besides making new images). I've been chasing my tail on this one for 3 days now, and am finally giving up.
Ok, I got it working, but it caused another issue that I had to fix. The entire problem above had to do with my CSS for .my-DockPanel
Before:
.my-DockPanel {
height: 100%;
width: 100%;
border-spacing: 0px;
font-color: white;
}
After:
.my-DockPanel {
height: auto;
width: 100%;
border-spacing: 0px;
font-color: white;
}
This created a new issue with certain pages sliding to the left, but all I had to do was set their width to be static. Problem solved!
Related
Hopefully somebody can help me with my issue.
I'm trying to make my own website, but when I try to move one of the three individual boxes(see picture), all three of them move. three boxes issue
[The same issue also happens with the social icons box but I'm less concerned with that section]
I'm hoping someone can take a look at the code and hopefully tell me where I've gone wrong.
My Website Files
You have put position:block in your css. There is no position:block in css. You have to use display property to that. I have change your box div's css to display: inline-block; and made few changes in width too.(using calc).
#import url('https://fonts.googleapis.com/css?family=Roboto|Roboto+Condensed|Source+Sans+Pro');
#import url('https://fonts.googleapis.com/css?family=Poppins');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-image: url(../css/images/background/backgroundimage.jpg);
}
/* HEADERBAR */
div#headerbar {
width: 100%;
height: 50px;
display: inline-block;
background-color: rgba(237,87,82, 0.65);
font-family: 'Source Sans Pro', sans-serif;
box-shadow: inset 0px 0px 20px 0px #000000,2px 2px 20px 2px #000000;
-webkit-box-shadow: inset 0px 0px 20px 0px #000000,2px 2px 20px 6px #000000;
-moz-box-shadow: inset 0px 0px 20px 0px #000000,2px 2px 20px 6px #000000;
-o-box-shadow: inset 0px 0px 20px 0px #000000,2px 2px 20px 6px #000000;
}
.leftlogo {
float: left;
margin-top: 12px;
margin-left: 15px;
color: #fff;
text-shadow: 1px 1px 1px #000;
font-size: 20px;
font-family: 'roboto+condensed', sans-serif;
}
.leftlogo span {
font-weight: 300;
color: rgba(237, 87, 82, 0.8);
font-size: 20px;
font-family: 'roboto', sans-serif;
}
.version {
float: right;
margin-top: 14px;
margin-right: 10px;
}
/* CODE TEST */
.box {
width: 40%;
margin: 0 auto;
background: rgba(255,255,255,0.2);
padding: 35px;
border: 2px solid #fff;
border-radius: 21px/40px;
background-clip: padding-box;
text-align: center;
}
.button {
margin-top: 10px;
font-size: 1em;
padding: 14px;
color: #fff;
text-decoration: none;
cursor: pointer;
transition: all 0.3s ease-out;
font-family: 'Source Sans Pro', sans-serif;
}
.button:hover {
background: rgba(255, 255, 255, 0.3);
border: 3px solid #000;
}
.overlay {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.7);
transition: opacity 500ms;
visibility: hidden;
opacity: 0;
}
.overlay:target {
visibility: visible;
opacity: 1;
}
.popup {
margin: 70px auto;
padding: 20px;
background: #000;
border-radius: 5px;
border: 5px solid #126b72;
width: 70%;
position: relative;
transition: all 5s ease-in-out;
color: #fff;
font-family: 'Roboto Condensed', sans-serif;
}
.popup h2 {
margin-top: 0;
color: #333;
font-family: Tahoma, Arial, sans-serif;
}
.popup .close {
position: absolute;
top: 20px;
right: 30px;
transition: all 200ms;
font-size: 30px;
font-weight: bold;
text-decoration: none;
color: #333;
}
.popup .close:hover {
color: #06D85F;
}
.popup .content {
max-height: 30%;
overflow: auto;
}
#media screen and (max-width: 700px){
.box{
width: 70%;
}
.popup{
width: 70%;
}
}
div#updatesbox {
width: 900px;
height: 40px;
background-color: #000;
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
box-shadow: inset 0px 0px 20px 0px #000000,2px 2px 20px 2px #000000;
}
.updatesbox1 {
width: 443px;
height: 30px;
background-color: rgba(255, 255, 255, 0.2);
display:inline-block;
margin-top: 5px;
margin-left: 5px;
box-shadow: inset 0px 0px 20px 0px #000000,2px 2px 20px 2px #000000;
-webkit-box-shadow: inset 0px 0px 20px 0px #000000,2px 2px 20px 6px #000000;
-moz-box-shadow: inset 0px 0px 20px 0px #000000,2px 2px 20px 6px #000000;
-o-box-shadow: inset 0px 0px 20px 0px #000000,2px 2px 20px 6px #000000;
}
.updatesbox2 {
width: 443px;
height: 30px;
background-color: rgba(255, 255, 255, 0.2);
float: right;
display: inline-block;
margin-top: 5px;
margin-right: 5px;
box-shadow: inset 0px 0px 20px 0px #000000,2px 2px 20px 2px #000000;
-webkit-box-shadow: inset 0px 0px 20px 0px #000000,2px 2px 20px 6px #000000;
-moz-box-shadow: inset 0px 0px 20px 0px #000000,2px 2px 20px 6px #000000;
-o-box-shadow: inset 0px 0px 20px 0px #000000,2px 2px 20px 6px #000000;
}
.twitter {
float: left;
margin-top: 7px;
margin-left: 40px;
}
.tweet {
color: white;
}
.facebook a {
color: rgba(273, 87, 84, 1);
text-decoration: none;
font-family: 'Poppins', sans-serif;
}
.facebookicon {
margin-left: 5px;
margin-top: 7px;
}
.steam a {
color: rgba(273, 87, 84, 1);
text-decoration: none;
font-family: 'Poppins', sans-serif;
}
.steamicon {
margin-left: 5px;
margin-top: 7px;
}
.instagram a {
color: rgba(273, 87, 84, 1);
text-decoration: none;
font-family: 'Poppins', sans-serif;
}
.instaicon {
margin-left: 5px;
margin-top: 7px;
}
.tweet a {
color: rgba(237, 87, 84, 1);
text-decoration: none;
font-family: 'Poppins', sans-serif;
}
/* ALTERNATING TEXT */
#tickertape{
display: block;
margin-left: 600px;
margin-right: auto;
margin-top: 14.5px;
text-align: center;
width:400px;
height:20px;
}
.tickertape {
display: block;
margin-top: 6px;
margin-left: 20px;
margin-right: auto;
color: #000;
}
#subtickertape{
position:absolute;
width:443px;
height:20px;
}
.subtickertapefont{
font:bold 12px Verdana;
text-decoration:none;
color: rgba(237, 87, 84, 0.6);
text-shadow: 2px 2px 2px #000;
}
.subtickertapefont a{
color:white;
text-decoration:none;
}
/* BODY CONTAINER BOX */
div#bodycontainer {
margin-top: 20px;
margin-left: auto;
margin-right: auto;
background-color: rgba(237, 87, 84, 0.3);
width: 90%;
height: 800px;
border: 2px dashed #000;
}
#bodycontainer #insidebox {
display: inline-block;
float: left;
width: calc(32.3% - 7.5px);
height: 500px;
margin: 15px;
margin-top: 70px;
background: rgba(237, 87, 84, 0.2);
border: 2px dashed #000;
}
#bodycontainer #centerbox {
display: inline-block;
float: left;
width: calc(32.3% - 7.5px);
height: 400px;
margin: auto;
margin-top: 200px;
background: rgba(255, 255, 255, 0.2);
border: 2px dashed #000;
}
#rightbox {
display: inline-block;
float: left;
width: calc(32.3% - 7.5px);
height: 710px;
margin: auto;
margin-top: 0px;
background: rgba(237, 87, 84, 0.2);
border: 2px dashed #000;
margin-left: 15px !important;
}
change your stylesheet.css to this and then you can move each box individually. Hope this helps you.
For some unknown reason, numbers keep showing up on the side of my div. I have tried everything to remove these numbers, but I have absolutely no idea where they appear from. I do know that it has to do with either the stylesheet or the html file. I provided the image below.
Also, "Vitalynx" is shifted all the way to the right and i cannot shift it back in the div with margin-left.. Any ideas? Help would be much appreciated!
leaderboard
Here's the html code:
<div id="ld">
<div class="leaderboard">
<h1>
Most active Players
</h1>
<ol>
<?= $fgmembersite->User1(); ?>
<?= $fgmembersite->User10(); ?>
</ol>
</div>
</div>
<br><br>
Here's the CSS:
/*--------------------
Leaderboard
--------------------*/
.ld h1 {
z-index: 0;
margin-top: -20px;
margin: -20px -5px 4px;
line-height: 40px;
text-shadow: 2px 1px 3px rgba(0,0,0,0.3);
font-weight: bold;
font: 23px "Lucida Grande", Tahoma, Verdana, sans-serif;
color: white;
text-align: center;
background: #12a7ee;
border-bottom: 0px solid #cfcfcf;
border-radius: 5px 5px;
-webkit-box-shadow: 3px 1px whitesmoke;
border-left:solid 0px #2ab7ec;
margin-left: 0px;
background-image: linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -o-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -moz-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -ms-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, rgb(44,160,202)),
color-stop(1, rgb(62,184,229))
);
border-radius: 6px;
-webkit-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #0c7095, 0px 10px 5px #999;
-moz-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #156785, 0px 10px 5px #999;
-o-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #156785, 0px 10px 5px #999;
box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #0c7095, 0px 10px 5px #999;
}
.leaderboard *,
.leaderboard *::before,
.leaderboard *::after {
box-sizing: border-box;
}
.leaderboard {
position: relative;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, 5%);
width: 245px;
height: 335px;
background-color: white;
background-color: #white;
border-radius: 10px;
box-shadow: 0 7px 30px rgba(62, 9, 11, 0.3);
}
.leaderboard h1 {
margin: -20px -2.8px 5px;
line-height: 40px;
text-shadow: 2px 1px 3px rgba(0,0,0,0.3);
font-weight: bold;
font: 23px "Lucida Grande", Tahoma, Verdana, sans-serif;
color: #fff;
text-align: center;
background: #12a7ee;
border-bottom: 0px solid #cfcfcf;
border-radius: 5px 5px;
-webkit-box-shadow: 3px 1px whitesmoke;
border-left:solid 0px #2ab7ec;
margin-left: -17.7px;
background-image: linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -o-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -moz-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -ms-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, rgb(44,160,202)),
color-stop(1, rgb(62,184,229))
);
border-radius: 6px;
-webkit-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #0c7095, 0px 10px 5px #999;
-moz-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #156785, 0px 10px 5px #999;
-o-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #156785, 0px 10px 5px #999;
box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #0c7095, 0px 10px 5px #999;
margin-left: -3px;
z-index: 0;
font-size: 18px;
color: #fffff;
padding: 12px 13px 15px;
}
.leaderboard h1 svg {
width: 25px;
height: 26px;
position: relative;
top: 3px;
margin-left: -30px;
vertical-align: baseline;
}
.leaderboard ol li {
margin-left: -22px;
position: relative;
z-index: 1;
font-size: 14px;
counter-increment: leaderboard;
padding: 18px 0px 23px 245px;
cursor: pointer;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transform: translateZ(0) scale(1, 1);
transform: translateZ(0) scale(1, 1);
}
.leaderboard ol li::before {
position: absolute;
z-index: 2;
top: 15px;
left: 15px;
width: 20px;
height: 20px;
line-height: 20px;
color: #2b70ab;
background: #fff;
border-radius: 20px;
text-align: center;
}
.leaderboard ol li mark {
position: absolute;
text-shadow: 1px 3px 3px rgba(0,0,0,0.3);
z-index: 2;
top: 0;
left: -4px;
width: 100%;
height: 100%;
padding: 18px 10px 18px 50px;
margin: 0;
background: none;
color: #fff;
}
.leaderboard ol li mark::before, .leaderboard ol li mark::after {
position: absolute;
z-index: 1;
bottom: -11px;
left: -9px;
border-top: 10px solid #563689;
border-left: 10px solid transparent;
-webkit-transition: all .1s ease-in-out;
transition: all .1s ease-in-out;
opacity: 0;
}
.leaderboard ol li mark::after {
left: auto;
right: -9px;
border-left: none;
border-right: 10px solid transparent;
}
#d {
text-decoration: underline;
}
#e {
margin-left: -40px;
color: #fff;
text-shadow: 1px 3px 3px rgba(0,0,0,0.2);
}
.leaderboard ol li small {
position: relative;
text-shadow: 1px 3px 3px rgba(0,0,0,0.8);
font-size: 13px;
margin-left: -34px;
z-index: 2;
display: block;
color: #05eccc;
}
.leaderboard ol li::after {
position: absolute;
z-index: 1;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
-webkit-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
opacity: 0;
}
.leaderboard ol li:nth-child(1) {
background: #82d1a1;
}
.leaderboard ol li:nth-child(1)::after {
background: #ac918e;
}
.leaderboard ol li:nth-child(2) {
background: #1bb288;
}
.leaderboard ol li:nth-child(2)::after {
background: #b79a98;
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}
.leaderboard ol li:nth-child(2) mark::before, .leaderboard ol li:nth-child(2) mark::after {
border-top: 6px solid #ba4741;
bottom: -7px;
}
.leaderboard ol li:nth-child(3) {
background: #119c75;
}
.leaderboard ol li:nth-child(3)::after {
/* background: #d7514d; */
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.11);
}
.leaderboard ol li:nth-child(3) mark::before, .leaderboard ol li:nth-child(3) mark::after {
bottom: -3px;
}
.leaderboard ol li:nth-child(4) {
background: #108363;
}
.leaderboard ol li:nth-child(4)::after {
background: #cd4b4b;
box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.15);
}
.leaderboard ol li:nth-child(4) mark::before, .leaderboard ol li:nth-child(4) mark::after {
top: -7px;
bottom: auto;
border-top: none;
border-bottom: 6px;
}
.leaderboard ol li:nth-child(5) {
background: #0c7558;
border-radius: 0 0 10px 10px;
}
.leaderboard ol li:nth-child(5)::after {
background: #c24448;
margin-top: -20px;
margin: -21px -16.8px 5px;
line-height: 40px;
text-shadow: 2px 1px 3px rgba(0,0,0,0.3);
font-weight: bold;
font: 23px "Lucida Grande", Tahoma, Verdana, sans-serif;
color: #fff;
text-align: center;
background: #12a7ee;
border-bottom: 0px solid #cfcfcf;
border-radius: 5px 5px;
-webkit-box-shadow: 3px 1px whitesmoke;
border-left:solid 0px #2ab7ec;
margin-left: -17.7px;
background-image: linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -o-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -moz-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -ms-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, rgb(44,160,202)),
color-stop(1, rgb(62,184,229))
);
border-radius: 6px;
-webkit-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #0c7095, 0px 10px 5px #999;
-moz-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #156785, 0px 10px 5px #999;
-o-box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #156785, 0px 10px 5px #999;
box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #0c7095, 0px 10px 5px #999;
}
.leaderboard ol li:nth-child(5) mark::before, .leaderboard ol li:nth-child(5) mark::after {
top: -9px;
bottom: auto;
border-top: none;
border-bottom: 8px;
}
.leaderboard ol li:hover {
z-index: 2;
overflow: visible;
}
.leaderboard ol li:hover::after {
opacity: 1;
-webkit-transform: scaleX(1.06) scaleY(1.03);
transform: scaleX(1.06) scaleY(1.03);
}
.leaderboard ol li:hover mark::before, .leaderboard ol li:hover mark::after {
opacity: 1;
-webkit-transition: all .35s ease-in-out;
transition: all .35s ease-in-out;
}
<ol> is the tag for an Ordered List, and so by default it will have numbers. If you'd like to remove them, do the following:
ol {
list-style-type:none;
}
In regards to your alignment issue, it seems that your right column text is left-aligned. I'd suggest making that text right-aligned, and the container would have to be positioned along the right hand side. Based on your structure, potential solutions would either be using position: absolute; right: 5px; on the text element, and then a position: relative on its parent or you could use float: right;, though I'd only suggest this method if you're familiar with how float works in general.
Your CSS is far too lengthy at this point for me to start digging through for an exact answer. Consider trimming it or posting only the relevant blocks and I can take a better look.
If I had to guess, I'd assume this is the block you're using to place the right column:
.leaderboard ol li {
...
margin-left: -22px;
padding: 18px 0px 23px 245px;
...
}
You're moving the text left by 245px using padding, which is a very "thrown together" method of accomplishing what you want. I'd start by changing the 245px to 0px and add a text-align: right; and moving forward from there.
Change <ol> to <ul> and add this style
ul li{list-style:none}
My question is this how do I make it work that the elements that are inside a div style=background-image work correctly when the screen gets smaller. In my case it seems that one of the elements inside the image box keeps the same height.
#main_article_box {
width: 728px;
height: 374px;
border: 1px solid #f8f8f8;
-moz-box-shadow: 0 2px 1px #9c9c9c;
-webkit-box-shadow: 0 2px 1px #9c9c9c;
box-shadow: 0 2px 1px #9c9c9c;
}
#main_article_text {
margin: 280px 3px 10px 3px;
height: 90px;
background: #ffffff;
border: 1px solid #f8f8f8;
background: #ffffff;
background: -moz-linear-gradient(#ffffff, #cccccc);
background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #cccccc), color-stop(1, #ffffff));
background: -webkit-linear-gradient(#ffffff, #cccccc);
background: -o-linear-gradient(#ffffff, #cccccc);
background: -ms-linear-gradient(#ffffff, #cccccc);
background: linear-gradient(#ffffff, #cccccc);
/*-moz-border-radius: 1px;
border-radius: 1px;
-moz-box-shadow: 0 1px 1px #f8f8f8;
-webkit-box-shadow: 0 1px 1px #f8f8f8;
box-shadow: 0 1px 1px #f8f8f8;*/
opacity: 0.8;
filter: alpha(opacity=80);
}
#main_article_title {
font-size: 23px;
letter-spacing: -1px;
text-transform: uppercase;
text-shadow: #333;
font-weight: bold;
margin: 8px;
}
#main_article_short_text {
font-size: 14px;
width: 530px;
font-weight: bold;
margin: -2px 0 0 8px;
color: #333333;
}
#media only screen and (max-width: 460px) {
#main_article_box {
width: 100%;
height: auto;
}
#main_article_text {
width: 98%;
height: auto;
}
#main_article_title {
font-size: 16px;
}
#main_article_short_text {
font-size: 11px;
}
}
<div id="main_article_box" style="background-image: url(http://www.watchathletics.com/data/headline/9718/rio%20usain%20bolt.jpg); no-repeat center; background-size: 100% auto; ">
<div id="main_article_text">
<div id="main_article_title">Main Article Title for this post
</div>
<div id="main_article_short_text">
<p>This is some intro text the article below title. This is some intro text the article below title.</p>...
</div>
</div>
</div>
I removed some styles only for me to understand the code. Is this solution correct for you?
.wrapper {
position:relative;
width:728px;
max-width:100%;
}
.wrapper:after {
content: ' ';
clear: both;
display: block;
}
#main_article_box {
float:left;
width:100%;
height:auto;
border:0 none;
padding-top:51.37%;
background-size:cover;
}
#main_article_text {
position: absolute;
left: 0;
right: 0;
bottom: 0;
margin: 0 3px 3px 3px;
height: 90px;
background: #ffffff;
border: 1px solid #f8f8f8;
background: #ffffff;
background: -moz-linear-gradient(#ffffff, #cccccc);
background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #cccccc),color-stop(1, #ffffff));
background: -webkit-linear-gradient(#ffffff, #cccccc);
background: -o-linear-gradient(#ffffff, #cccccc);
background: -ms-linear-gradient(#ffffff, #cccccc);
background: linear-gradient(#ffffff, #cccccc);
/*-moz-border-radius: 1px;
border-radius: 1px;
-moz-box-shadow: 0 1px 1px #f8f8f8;
-webkit-box-shadow: 0 1px 1px #f8f8f8;
box-shadow: 0 1px 1px #f8f8f8;*/
opacity:0.8;
filter:alpha(opacity=80);
}
#main_article_title {
font-size: 23px;
letter-spacing: -1px;
text-transform:uppercase;
text-shadow: #333;
font-weight: bold;
margin: 8px;
}
#main_article_short_text {
font-size: 14px;
width: auto;
font-weight:bold;
margin: -2px 0 0 8px;
color: #333333;
}
#media only screen and (max-width: 460px) {
#main_article_box {
width: 100%;
height: auto;
}
#main_article_text {
width: 98%;
height: auto;
}
#main_article_title {
font-size: 16px;
}
#main_article_short_text {
font-size: 11px;
}
}
<div class="wrapper">
<div id="main_article_box" style="background-image: url(http://www.watchathletics.com/data/headline/9718/rio%20usain%20bolt.jpg);">
<div id="main_article_text">
<div id="main_article_title">Main Article Title for this post</div>
<div id="main_article_short_text"><p>This is some intro text the article below title. This is some intro text the article below title. </p>...</div>
</div>
</div>
</div>
I am trying to make the background color of the div: content2 the same as that of div: sidebar. However the background color does not show for content2 but it does for sidebar.
Also i am trying to make the header and footer bars transparent but it does not seem to work.
This is my css code
body {
background-image: url('background.jpg');
background-size: 100% 100%;
padding: 0px 0px 0px 0px;
font-size: 13px;
position: relative;
min-height: 400px;
}
#footer {
float: left;
height: 20px;
width: 100%;
border: 1px solid black;
text-align: center;
padding: 30px 0px 20px 0px;
border-radius: 24px;
-webkit-border-radius: 24px;
-moz-border-radius: 24px;
box-shadow: 2px 2px 3px #666666;
-webkit-box-shadow: 2px 2px 3px #666666;
-moz-box-shadow: 2px 2px 3px #666666;
background: #8B8B8B;
background: linear-gradient(top, #A9A9A9, #7A7A7A);
background: -ms-linear-gradient(top, #A9A9A9, #7A7A7A);
background: -webkit-gradient(linear, left top, left bottom, from(#A9A9A9), to(#7A7A7A));
background: -moz-linear-gradient(top, #A9A9A9, #7A7A7A);
border: solid 1px #6D6D6D;
position:relative;
z-index:999;
//transparency
opacity: 0.6;
filter: alpha(opacity=60); /* For IE8 and earlier */
}
#content2 { //sign in page
background-color: #EEE;
float: left;
margin: 38px 20px 38px 200px;
height: 370px;
width: 550px;
border: 1px solid black;
padding: 15px;
padding-top: 20px;
font-size: 18px;
}
#sidebar {
background-color: #EEE;
float: left;
margin: 38px 200px 38px 20px;
height: 300px;
width: 250px;
border: 1px solid black;
padding: 15px;
}
#menucontainer{
width: 79.5%;
text-align: center;
margin: 0px 0px 0px 0px;
padding: 6px 6px 4px 270px;
height: 60px;
line-height: 25px;
border-radius: 24px;
-webkit-border-radius: 24px;
-moz-border-radius: 24px;
box-shadow: 2px 2px 3px #666666;
-webkit-box-shadow: 2px 2px 3px #666666;
-moz-box-shadow: 2px 2px 3px #666666;
background: #8B8B8B;
background: linear-gradient(top, #A9A9A9, #7A7A7A);
background: -ms-linear-gradient(top, #A9A9A9, #7A7A7A);
background: -webkit-gradient(linear, left top, left bottom, from(#A9A9A9), to(#7A7A7A));
background: -moz-linear-gradient(top, #A9A9A9, #7A7A7A);
border: solid 1px #6D6D6D;
z-index:999;
}
#menu-bar {
width: 624px;
margin-left: auto;
margin-right: auto;
height: 395px;
}
And this is my html code
<div id="menucontainer">
<ul id="menu-bar">
menu
</ul>
</div>
<div id="content2">
content 2
</div>
<div id="sidebar">
side bar
</div>
<div id="footer">
footer
</div>
</body>
Can anyone please help me with this? Thanks
It's because you used the // to comment a single line in CSS. You can just use the pair /* and */ to comment in CSS. So all the following CSS is discarded. Check this Demo
replace comment "//sign in page" with "/*sign in page */" .
add opacity in header and footer div #footer and #menucontainer
#menucontainer {
opacity: 0.5;
}
or change in background style code like this
#menucontainer {
background: -webkit-gradient(linear, left top, left bottom, from(rgba(169, 169, 169, 0.8)), to(rgba(124, 124, 124, 0.8)));
background: -moz-linear-gradient(top, rgba(169, 169, 169, 0.8), rgba(124, 124, 124, 0.8) ); }
and for background in content 2 add background property in class #content2
#content2 {
float: left;
margin: 38px 20px 38px 200px;
height: 370px;
width: 550px;
border: 1px solid black;
padding: 15px;
padding-top: 20px;
font-size: 18px;
background: #ccc;
}
and delete those things from your code
//transparency
//sign in page
the // is valid only if you are writing and .scss file (sass), that's usually the comment syntax for javascript also.
the standard css comment syntax is /* your comment here */
It is working correctly.
But the thing is comments inside style tag should be done through this fashion /* -- */
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body {
background-image: url('background.jpg');
background-size: 100% 100%;
padding: 0px 0px 0px 0px;
font-size: 13px;
position: relative;
min-height: 400px;
}
#footer {
float: left;
height: 20px;
width: 100%;
border: 1px solid black;
text-align: center;
padding: 30px 0px 20px 0px;
border-radius: 24px;
-webkit-border-radius: 24px;
-moz-border-radius: 24px;
box-shadow: 2px 2px 3px #666666;
-webkit-box-shadow: 2px 2px 3px #666666;
-moz-box-shadow: 2px 2px 3px #666666;
background: #8B8B8B;
background: linear-gradient(top, #A9A9A9, #7A7A7A);
background: -ms-linear-gradient(top, #A9A9A9, #7A7A7A);
background: -webkit-gradient(linear, left top, left bottom, from(#A9A9A9), to(#7A7A7A));
background: -moz-linear-gradient(top, #A9A9A9, #7A7A7A);
border: solid 1px #6D6D6D;
position:relative;
z-index:999;
/*transparency*/
opacity: 0.6;
filter: alpha(opacity=60); /* For IE8 and earlier */
}
#content2 {
background-color: #EEE;
float: left;
margin: 38px 20px 38px 200px;
height: 370px;
width: 550px;
border: 1px solid black;
padding: 15px;
padding-top: 20px;
font-size: 18px;
}
#sidebar {
background-color: #EEE;
float: left;
margin: 38px 200px 38px 20px;
height: 300px;
width: 250px;
border: 1px solid black;
padding: 15px;
}
#menucontainer{
width: 79.5%;
text-align: center;
margin: 0px 0px 0px 0px;
padding: 6px 6px 4px 270px;
height: 60px;
line-height: 25px;
border-radius: 24px;
-webkit-border-radius: 24px;
-moz-border-radius: 24px;
box-shadow: 2px 2px 3px #666666;
-webkit-box-shadow: 2px 2px 3px #666666;
-moz-box-shadow: 2px 2px 3px #666666;
background: #8B8B8B;
background: linear-gradient(top, #A9A9A9, #7A7A7A);
background: -ms-linear-gradient(top, #A9A9A9, #7A7A7A);
background: -webkit-gradient(linear, left top, left bottom, from(#A9A9A9), to(#7A7A7A));
background: -moz-linear-gradient(top, #A9A9A9, #7A7A7A);
border: solid 1px #6D6D6D;
z-index:999;
}
#menu-bar {
width: 624px;
margin-left: auto;
margin-right: auto;
height: 395px;
}
</style>
</head>
<body>
<div id="menucontainer">
<ul id="menu-bar">
menu
</ul>
</div>
<div id="content2">
content 2
</div>
<div id="sidebar">
side bar
</div>
<div id="footer">
footer
</div>
</body>
</html>
JS Fiddle:
http://jsfiddle.net/zRS84/
I have a menu with a background img in hover.
Only with crhome, i dont see the menu voices when I load the page.
Following, if I go with the mouse to select the voice, appears the menu voices with the img's background, and remains.
I dont have this problem with firefox.
That's the CSS code:
#header {
width: 100%;
text-align: left;
display: block;
height: 60px;
margin: auto ;
width: 100%;
font-size: 130%;
z-index: 10px;
background-color: white;
border-bottom: 1px solid lightgray;
}
#header .main_menu {
height: 100%;
margin: 0 auto;
text-align: center;
width: 700px;
padding-top: 7.5px;
z-index:100;
}
#header .main_menu .normal {
display: inline-block;
width: 100px;
font-weight: bolder;
border-radius: 20px;
padding: 10px 0px;
height: 14px;
border: 2px solid white;
}
.main_menu .logo_main_menu{
display: inline-block;
width: 140px;
font-weight: bolder;
border-radius: 10px;
padding: 14px 0px;
height: 11.5px;
border: 2px solid white;
}
.main_menu .logo_main_menu:hover ,#header .here_home {
color: transparent;
background: url("../images/logo_tapling.png") ;
background-size: 140px;
}
.normal:hover , #header .active{
background: url("../images/bg_tapling.png") ;
color: white;
-moz-box-shadow: 0px 0px 2px 0px black ;
-ms-box-shadow: 0px 0px 2px 0px black ;
-webkit-box-shadow: 0px 0px 2px 0px black ;
box-shadow: 0px 0px 2px 0px black ;
}
.free_img_2{
display: none;position: relative;height: 100px;margin-bottom: -100px;
float: right;right: 146px;z-index: 20;
}
.free_img{
position: relative; height: 100px;margin-bottom: -100px;
float: right;top:-5px;right: -8px;
}
#header .main_menu .normal a:hover {
}
.can_bg{
border: 2px white solid;
}
#header .normal .active ,#header .normal .main_menu a:hover
{
}
#mainmenu2{
z-index: 10;
position: relative;
/*top:60px;*/
/*left:50%;*/
/*margin-left: -235px;*/
/*right: auto;*/
/*margin:62px auto ;*/
}
#mainmenu2{
display: none;
border-left:2px solid white;
border-right: 2px solid white;
border-bottom: 2px solid white;
-moz-box-shadow: 2px 8px 6px -3px black ;
-ms-box-shadow: 2px 8px 6px -3px black ;
-webkit-box-shadow:2px 8px 6px -3px black;
box-shadow: 2px 8px 6px -3px black;
border-radius:0px 0px 10px 10px;
border-radius: 0 0 10px 10px;
color:black;
padding: 5px 0;
text-align:center;
font-weight:900;
background: url("../images/bg_tapling.png") ;
}
#mainmenu2 ul{
margin: 0px;
padding: 0px;
}
#mainmenu2 li a{
color: white;
text-shadow: none;
}
#mainmenu2 li a:hover{
color: green;
}
#mainmenu2 li .active{
color: lightgreen;
}
#mainmenu2 li{
width: 40%;
text-align: center;
margin: 2.5px auto ;
padding: 10px;
-moz-box-shadow:inset 0px 1px 0px 0px black;
-ms-box-shadow:inset 0px 1px 0px 0px black;
-webkit-box-shadow:inset 0px 1px 0px 0px black;
box-shadow:inset 0px 1px 0px 0px #ffffff;
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05,
#ededed),color-stop(1, #000000) );
background:-moz-linear-gradient( center top, #ededed 5%, #000000 100% );
background:-ms-linear-gradient( center top, #ededed 5%, #000000 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed',
endColorstr='#000000');
background-color:black;
-moz-border-radius:6px;
-webkit-border-radius:6px;
-ms-border-radius:6px;
border-radius:6px;
/*border:1px solid #dcdcdc;*/
display:inline-block;
color:#777777;
font-family:arial;
font-size:15px;
font-weight:bold;
/*padding-right: 2.5%;*/
text-decoration:none;
text-shadow:1px 1px 0px #ffffff;
}
#mainmenu2 li:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05,
#dfdfdf), color-stop(1, #ededed) );
background:-moz-linear-gradient( center top, #dfdfdf 5%, #ededed 100% );
background:-ms-linear-gradient( center top, #dfdfdf 5%, #ededed 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf',
endColorstr='#ededed');
background-color:#dfdfdf;
}
.logo {
float: left;
margin: 0;
padding: 5px auto;
height: 100%;
}
.logo img {
height: 56px;
}
#header .menu {
width: 434px;
margin: 0 auto;
}
.menu{
display: none;
}
And this is HTML:
<div id="header">
<div class="menu">
<div class="logo">
<a href="<?=URL?>" >
<img src="<?php echo URL; ?>theme/<?= $this->_theme ? >/images/logo_tapling.png" />
</a>
<div class="separatore"></div>
</div>
<div class="btn-responsive-menu">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</div>
</div>
<div class="main_menu">
<a href="<?=URL?>classifica" class="normal <?=$classifica?> ">Classifica
</a>
<a href="<?=URL?>regole" class="normal <?=$regole?>">
Regole
</a>
<a href="<?=URL?>" class="logo_main_menu <?=$home?> " >
Tapling
</a>
Faq
Contatti
</div>
</div>
Tnx so much!
change this
.normal:hover , #header .active{
background: url("../images/bg_tapling.png") ;
color: white;
-moz-box-shadow: 0px 0px 2px 0px black ;
-ms-box-shadow: 0px 0px 2px 0px black ;
-webkit-box-shadow: 0px 0px 2px 0px black ;
box-shadow: 0px 0px 2px 0px black ;
}
to this
.normal:hover , #header .active{
background: url("../images/bg_tapling.png") ;
-moz-box-shadow: 0px 0px 2px 0px black ;
-ms-box-shadow: 0px 0px 2px 0px black ;
-webkit-box-shadow: 0px 0px 2px 0px black ;
box-shadow: 0px 0px 2px 0px black ;
}