This is my page:
link
As you can see on the screen shot, the icons (red circle) are not aligned with icons above it (click on title to expand it).
alt text http://img338.imageshack.us/img338/1390/35070527.jpg
The CSS:
body
{
font-family: arial, helvetica, sans-Serif;
}
#talkbacks .noshow
{
overflow:hidden;
clear:both;
padding: 2px 10px;
}
#talkbacks ul.top
{
border: solid 1px #fff;
margin: 0 -1px;
}
#talkbacks li
{
width: 100%;
/*margin-top: 5px;*/
}
/*
#talkbacks ul
{
clear: both;
}*/
.n
{
color: #758888;
float: left;
font-size: 12px;
padding-right: 8px;
line-height: 15px;
width:15px;
}
.c
{
float: left;
/*width: 400px; */
width:92%;
margin-top: 0px;
margin-right:5px;
}
.d
{
font-weight: bold;
color: #758888;
font-size: 12px;
line-height: 15px;
margin: 0;
padding: 0;
}
ul
{
list-style-image: none;
list-style-position: outside;
list-style-type: none;
padding-left:0px;
margin-left:0px;
margin-top:5px;
margin-bottom:5px;
clear:both;
}
a
{
font-size: 12px;
line-height: 15px;
font-weight: bold;
}
a:link, a:visited
{
color: #284D99;
text-decoration: none;
outline: none;
}
a:hover, a:active
{
text-decoration: underline;
}
li ul li div.c
{
padding-left: 26px;
}
li ul li ul li div.c
{
padding-left: 52px;
}
li ul li ul li ul li div.c
{
padding-left: 77px;
}
li ul li ul li ul li ul li div.c
{
padding-left: 104px;
}
#talkbacks .noshow .userpanel
{
display: none;
}
#talkbacks .noshow .adminpanel
{
display:none;
}
#talkbacks .noshow div.CommentBody, .show div.CommentBody p
{
display: none;
}
/*************** Show Comment **********************/
#talkbacks .show
{
background: #F3F3F3 none repeat scroll 0 0;
border-bottom: 1px solid #B6C7C7;
border-top: 1px solid #B6C7C7;
display: table;
font-size: 12px;
padding: 11px 10px;
width: 439px;
}
/*#talkbacks .show p
{
font-size: 1em;
}*/
#talkbacks .show div.CommentBody, .show div.CommentBody p
{
display: block;
margin: 1.5px 0 0 0;
font-size: 12px;
}
#talkbacks .show .userpanel
{
margin-top: 10px;
display:block;
}
#talkbacks .show .userpanel .votes div.voteResult
{
background-color: #FFFFFF;
border: 1px solid #EBEBEB;
color: #555555;
float:left;
font-weight: bold;
padding: 0 4px;
font-size: 11px;
}
#talkbacks .show .userpanel div.reply
{
float:left;
}
#talkbacks .show .userpanel .votes div.buttons
{
float:left;
}
/*************************** Add new comment **********************************/
#NewComment .textBox
{
border: 1px Solid #002080;
overflow:auto;
}
.linka
{
cursor: pointer;
cursor: hand;
}
The problematic part is this one(i think):
li ul li div.c
{
padding-left: 26px;
}
li ul li ul li div.c
{
padding-left: 52px;
}
I want to move the div "c", to the right without shifing the userpanel with the icons.
you could do this a easy way.
<div class="commentcontainer">
......
<div class="updown">....</div>
......
</div>
style :
.commentcontainer{position:relative;}
.commentcontainer .updown {position:absolute; top:20px; right:20px;}
this should work. sorry i used other classes and stuff..
the main ideea is: put position:relative; in the css of the commentbox and put position:absolute; top:20px; right:20px; in the css of the up/down vote this should put your up/down vote img`s in the same spot in all comments.
Or if this does not work you should check the width of the commentbox`s if it has a defined value.. try to put : width:100%;
Hope it helps
The problem is you are setting the width to 92% of its container then adding 52px of padding onto that. That is making the layout something like this:
|26px| LEVEL 1 |
| | 92% |
| 52px | LEVEL 2 |
| | 92% |
As the icons are aligned to the right, they are now offset as the right edge is further across. I would recommend not setting the width of the div and instead using margins to align them, something like this:
|26px| LEVEL 1 |
| | |
| 52px | LVL2 |
| | |
As a tip for debugging these sorts of issue, put borders on everything of different colours. This would probably have made what is happening more obvious as you would "see" it.
Tested in FF3
#talkbacks .show
{
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:#F3F3F3 none repeat scroll 0 0;
border-bottom:1px solid #B6C7C7;
border-top:1px solid #B6C7C7;
font-size:12px;
overflow:hidden;
padding:11px 10px;
position:relative;
width:439px;
}
div.votes
{
float:none !important;
position:absolute;
right:20px;
}
Related
Hi I am having trouble shifting a menu list on my wordpress site to the left. It appears as if there is a margin so when the list contains so many items it appears right offset and no longer centred. The site in question is www.cabinboys.ca the menu I'm talking about is right below the cabinboys image filled with two letter items. If any one could look at my css and see if they could figure out how to shift the list items to the left that would be much appreciated thanks.
/* =Menu
----------------------------------------------- */
#menu {
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
margin-bottom: 25px;
padding: 10px;
text-align: right;
width: 800px;
}
#menu img {
margin-bottom: 10px;
}
#menu a {
color: #666;
font-family: 'Oswald', Helvetica, Arial, sans-serif;
font-size: 18px;
margin: 0 10px;
text-decoration: none;
text-transform: uppercase;
}
#menu a:hover {
color: #36bcab;
}
#menu ul {
list-style: none;
margin: 0;
padding-left: 30;
}
#menu li {
float: right;
position: relative;
}
#menu ul ul {
display: none;
float: right;
position: absolute;
right: 0;
z-index: 99999;
}
#menu ul ul ul {
right: 100%;
top: 0;
}
#menu ul ul a {
background: #e9e9e9;
border-bottom: 1px solid #e1e1e1;
display: block;
font-size: 14px;
height: auto;
line-height: 1em;
margin: 0 ;
padding: .8em .5em .8em 1em;
width: 130px;
}
#menu ul ul li:last-of-type a {
border-bottom: none;
}
#menu li:hover > a,
#menu ul ul :hover > a {
color: #36bcab;
}
#menu ul ul a:hover {
background: #36bcab;
}
#menu ul li:hover > ul {
display: block;
}
#menu ul li.current_page_item > a,
#menu ul li.current_page_ancestor > a,
#menu ul li.current-menu-item > a {
color: #111;
}
#menu ul:after {
clear: both;
content: ' ';
display: block;
}
You should add a couple of properties to make it work:
#menu-header-menu {
display:table;
margin:0 auto;
padding:0;
}
Nevertheless it's interesting that you say that the shift happened when the number if items in the menu increased, I don't see in the CSS any code that could differentiate the display depending on the number of items. Could you confirm that I understood the situation?
How can I remove the white border under the tag from this drop down menu? I only want it to appear when the drop down item is hovered.
Please see for the website. www.velnikolic.com/music Need to type more for limit to go down.
Current CSS
/* Navigation --------------------------------------- */
.main-menu li {
display: block;
font-weight: 10000;
text-transform: uppercase;
letter-spacing: 2px;
position: relative;
text-align:center;
padding:15px 70px;
margin-bottom:1px;
}
.main-menu li:hover {
display: block;
background:black;
color:white;
}
.main-menu li:hover a{
color:white;
border-bottom: 2px solid white;
}
ul.main-menu a {
margin-left: 0px;
text-align: center;
}
.main-menu > li:first-child { margin-top: 0; }
.main-menu ul { margin-left: 20px; }
.main-menu a { color: #999;
text-align:center;
}
.main-menu li a:hover,.main-menu li a:focus {
color:white;
}
.main-menu .current-menu-item > a,
.main-menu .current_page_item > a { color: white; }
li.current-menu-item{
background:black;
color:white;
}
.main-menu .current-menu-item:before,
.main-menu .current_page_item:before {
/*content: '\f405';
display: block;
font: 16px/1 "Genericons";
color: #019EBD;
position: absolute;
top: -1px;
left: -20px;*/
}
/* -------------------------------------------------------------------------------- */
/* User-Added-1. Drop Down Menu
/* -------------------------------------------------------------------------------- */
ul.sub-menu{
display: none;
}
li:hover .sub-menu {
background: #34495e;
border: #fff solid;
border-width: 1px;
display: block;
position: absolute;
left: 180px;
top: -1px;
}
you must be talking about text decoration property
try this :
text-decoration:none;
possible values are:
none
underline
overline
line-through
This should work:
ul.main-menu a
{
border-bottom: 0;
}
ul.main-menu a
{
border-bottom: 2px solid white;
}
EDIT: Try
Changing .main-menu li:hover a to .main-menu li:hover > a
and add the following:
.main-menu li:hover a
{
color: white;
}
My navigation bar works perfectly fine, any image links work fine, but all text links on my page jump down when I click on them. Most of them jump so far you cannot actually click it.
I also noticed my a:visited links are inheriting the color #000 from somewhere, when they should be #616161. There is no issue when browsing on my Android device, but happens in IE11 and Chrome32.
The HTML is nothing special. Just
Page Name
type links. It has to be something with the CSS.
The CSS:
body {
background-color: #7296d9;
max-width:1000px;
}
#wrapper {
width:auto;
background:url(../images/bg.jpg);
background-repeat:repeat;
margin:4px;
}
#content {
width:98%;
text-align:center;
margin:auto;
}
#paragraph {
width:80%;
font-size:18px;
color: #666;
font-weight:100;
text-align:justify;
margin:10px auto 25px auto;
}
.reviews {
width:80%;
margin:auto;
text-align:justify;
color: #666;
}
p {
margin:10px 0 10px 0;
}
h1 {
line-height:48px;
font-size:36px;
font-weight:bold;
text-align:center;
margin-top:10px;
}
h2 {
line-height:42px;
font-size:24px;
font-weight:bold;
text-align:center;
}
a:link, a:visited {
color: #616161;
text-decoration: underline;
}
a:hover, a:active {
color: #ffffff;
text-decoration: underline;
}
#header {
height:86px;
max-height:86px;
width:98%;
min-width:500px;
position:relative;
background-image:url(../images/logo.png);
background-repeat:no-repeat;
}
#header .left {
float:left;
height:auto;
}
#header .media-header {
float:right;
margin-top:50px;
margin-right:-20px;
}
#menu ul li:hover > ul {
display: block;
}
#menu {
display:table;
width:100%;
background: -webkit-linear-gradient( #d5d5d5, #595959); /* For Safari */
background: -o-linear-gradient( #d5d5d5, #595959); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient( #d5d5d5, #595959); /* For Firefox 3.6 to 15 */
background: linear-gradient( #d5d5d5, #595959); /* Standard syntax */
-webkit-border-radius: 25px;
-o-border-radius: 25px;
-moz-border-radius: 25px;
border-radius: 25px;
}
#menu ul ul {
display: none;
}
#menu ul {
height:auto;
font-size: 16px;
font-family: "Times New Roman", Times, serif;
font-weight: bold;
text-align: center;
text-shadow: 2px 2px 2px #cccccc;
text-decoration:none;
list-style: none;
position: relative;
display: table-row;
}
#menu a:link, a:visited {
display:block;
text-decoration: none;
color: #000000;
padding: 8px auto 8px auto;
}
#menu a:hover, a:active {
display:block;
padding:5px;
text-decoration:none;
color: #fff;
}
#menu ul:after {
content: "";
clear:both;
display: block;
}
#menu ul li {
display:table-cell;
width:auto;
}
#menu ul a:link, a:visited {
display: block;
padding: 5px;
color: #000;
text-decoration: none;
}
#menu ul a:hover, a:active {
display:block;
padding:5px;
text-decoration:none;
color: #fff;
}
#menu ul ul {
background: #999;
border-radius: 0px;
padding: 0;
position: absolute;
}
#menu ul ul li {
width:auto;
border-top: 1px solid #ccc;
position: relative;
display:block;
}
#menu ul ul li a {
padding: 5px;
text-align:left;
color: #000;
}
#menu ul ul li a:hover {
color: #FFF;
}
#menu ul ul:last-child, nav ul ul:last-child a {
-webkit-border-bottom-right-radius: 10px;
-o-border-bottom-right-radius: 10px;
-moz-border-radius-bottomright: 10px;
border-bottom-right-radius: 10px;
-webkit-border-bottom-left-radius: 10px;
-o-border-bottom-left-radius: 10px;
-moz-border-radius-bottomleft: 10px;
border-bottom-left-radius: 10px;
}
.center {
text-align:center;
}
#reviews {
width:80%;
text-align:justify;
overflow:hidden;
margin:25px auto 25px auto;
}
#reviews img {
position:relative;
float:left;
}
#form {
color: #666;
margin:0px auto 0px auto;
width:350px;
}
#form p {
color: #666;
margin:0px auto 0px auto;
width:350px;
}
.bottombar {
margin:auto;
width:100%;
}
#footer {
display:block;
font-size:12px;
color: #616161;
text-align:center;
width:auto;
margin:5px auto 5px auto;
}
#footer img {
text-align:center;
color: #616161;
width:100%;
margin:5px auto 5px auto;
}
#media-footer {
text-align:center;
margin:10px 0 15px 55px;
}
#media-footer img {
text-align:center;
margin:10px 0 15px 55px;
}
nav ul {
display:none;
}
#minimenu {
display:none;
}
It's because you are adding padding to the element when it is :active:
#menu ul a:hover, a:active {
display: block;
padding: 5px;
text-decoration: none;
color: #fff;
}
It's worth noting that you are repeating the same styling in different instances.
#menu a:hover, a:active {
display: block;
padding: 5px;
text-decoration: none;
color: #fff;
}
Just remove the padding from both declarations and it will work as expected.
I have got a task to do horizontal menu. While creating the menu i got a problem with the style.When we are hovering the menu it is jumping and also the sub child menu is comes at different position depending on the size of the text. My css file is
#wrapper {
width:100%;
height:500px;
}
h2 {
color:#787878;
}
#menu, #menu ul {
list-style: none;
//padding: 2px;
}
#nav{
border-bottom: 1px solid #CCCCCC;
border-spacing: 0;
display: table;
float: left;
height: 25px;
width: 100%;
}
#nav ul {
margin: 0;
padding: 0;
}
#nav > ul > li:hover {
background: none repeat scroll 0 0 #FFFFFF;
border-color: #ccc #ccc #FFFFFF;
border-style: solid;
border-width: 1px;
padding-bottom: 0;
border-radius:1px;
}
.menu-child {
width:160px;
display:block !important;
}
#nav ul li ul li:hover {
}
#nav ul li ul :hover {
}
#menu {
float: left;
height: 25px;
}
#menu> li {
float: left;
}
#menu li a {
display: block;
height: 2em;
line-height: 2em;
padding: 0 1.5em;
text-decoration: none;
}
#menu ul {
position: absolute;
display: none;
z-index: 999;
}
#menu ul li a {
}
#menu li:hover ul {
display: block;
}
#menu {
font-family: Arial;
font-size: 12px;
//background: #F8F8F8;
}
#menu > li > a {
font-family: Verdana, Arial, sans-serif;
font-style: normal;
color:#787878;
font-weight: bold;
}
#menu > li > a:hover {
color: #000;
}
#menu ul {
background: none repeat scroll 0 0 #FFFFFF;
border-radius: 0 0 5px 5px;
margin-top: 1px;
}
#menu ul li a {
color: #000;
}
#menu ul li a:hover {
background: #E0E0E0;
}
.logout {
float:right;
width:300px;
}
.title {
float:left;
width:300px;
}
#footer {
width:100%;
height:100px;
float:left;
}
.subchild-list {
margin:0;
position: absolute !important;
top:0;
right:-87px;
//border-color: #ccc #FFFFFF #ccc #FFFFFF;
}
.child-list ul {
display: none !important;
position: absolute !important;
z-index: 999 !important;
}
.child-list li {
position:relative !important;
}
.child-list li:hover ul {
display: block !important;
}
.child-list li{
border-left:1px solid #C0C0C0;
border-right:1px solid #C0C0C0;
}
.child-list ul{
border-top:1px solid #C0C0C0;
border-bottom:5px solid #C0C0C0;
}
.child-list{
border-bottom:5px solid #C0C0C0;
}
.nav-subchild
{
border-color: #ccc #FFFFFF #ccc #FFFFFF;
}
You can see my code from http://jsfiddle.net/ucpcA/1/ How can i solve this problem?
Add to css this:
li {border: 1px solid #fff;}
I tried it in fiddle and it solved "jumping"
//Edit
The main idea is to set border to the top li elements so when you add additional border with color it will not jump
//Edit 2 to solve your 2nd problem
To sovle your 2nd prbolem put this line
.subchild-list {
margin:0;
right:-150px;
position: absolute !important;
top:0; }
#menu ul li {width: 150px;}
It is just an example so you will see what it does. Put there the ewidth which you really need.
I have a css class called navigation which will hold some link and when i'll add some extra link it will go from left to right and then again it'll come to bottom of the LHS. i use background-repeat: repeat-y; and height:auto; but the image is not repeating instead of a white background is coming. I'm working on IE8. the css codes are given below:
#navigation {
background: url(../images/custom/lite/navigation_bg.gif);
border-top: 7px solid #455660;
height: auto;
background-repeat:repeat-y;
}
#navigation ul,
#add-page {
float: left;
}
#navigation a {
color: #FFF;
display: block;
font: 14px/56px Arial,Helvetica,sans-serif;
font-weight:bold;
height: 50px;
padding: 0 24px;
text-decoration: none;
}
#navigation a:hover {
color: #000;
}
#navigation .selected a {
color:#000
}
#navigation .selected a {
font-size: large;
text-transform: uppercase;
}
#reuben, you given float in your ul so you have clear it #navigation
like this:
#navigation {
overflow:hidden;
}
may that's help you
What does your HTML look like? You say you have a class called navigation but your selector syntax is that of an ID.
For your CSS to work as shown here, you should have something like
<div id="navigation">...</div>
change your css to the below:
.navigation {
background: url(../images/custom/lite/navigation_bg.gif);
border-top: 7px solid #455660;
height: auto;
background-repeat:repeat-y; }
.navigation ul,
#add-page {
float: left; }
.navigation a {
color: #FFF;
display: block;
font: 14px/56px Arial,Helvetica,sans-serif;
font-weight:bold;
height: 50px;
padding: 0 24px;
text-decoration: none; }
.navigation a:hover {
color: #000; }
.navigation .selected a {
color:#000 }
.navigation .selected a {
font-size: large;
text-transform: uppercase; }