Tech NovoGeek

...Technology Simplified

Showing posts with label CSS. Show all posts

Wednesday, May 30, 2012

Insert an image in select control

No comments :
 
select#colormenu option[value="Red"]
{
background-image:url(red.png) ;
background-repeat:no-repeat;
}
select#colormenu option[value="Green"]
{
background-image:url(red.png) ;
background-repeat:no-repeat;
}
select#colormenu option[value="Blue"]
{
background-image:url(red.png) ;
background-repeat:no-repeat;
}
select.icon-menu option
{
background-repeat:no-repeat;
background-position:bottom left;
padding:0px 0px 0px 20px;
}


<select  id="colormenu" class="icon-menu">
<option value="none">Select color</option>
<option value="Red">Red</option>
<option value="Green">Green</option>
<option value="Blue">Blue</option>
</select>


clip_image001



But one issue with this code is it doesnt work on all browsers , but still it doesnt mess up the design..

Thursday, April 26, 2012

Image in Textbox

No comments :
.tb11 {   
    background:#FFFFFF url(search.png) no-repeat 4px 4px;
    padding:4px 4px 4px 22px;
    border:1px solid #CCCCCC;
    width:230px;
    height:18px;
}<div class="tb5">
      <asp:TextBox ID="TextBox1" runat="server" CssClass="tb5a"></asp:TextBox>
  </div>
search

Rounded css textbox

No comments :
 
 
     
     
 
 
    

rounded

Friday, April 20, 2012

Flashing table row background

No comments :
Can check this helps
http://jsfiddle.net/anuradha/w9UQn/

Friday, March 9, 2012

Remove vertical scrollbar in syntaxhighlighter

No comments :
An annoying bug in the new version of SyntaxHighlighter 3 shows vertical scrollbar on every code snippet.

To fix this, change the code under syntaxhighlighter/syntaxhighlighter3/styles/shCore.css and replace overflow: auto !important; with the code below:

.syntaxhighlighter
{...
overflow-x: auto !important;
overflow-y: hidden !important;
...
}

to:
.syntaxhighlighter {
...
overflow: hidden !important;
...
}

Wednesday, February 29, 2012

Create basic CSS menu with sub item

No comments :
To create menu item we generally use ul-li tags
<div id="css_menu">
<ul>
<li class="mainmenu"><a href="#">Link 1</a>
<ul>
<li class="submenu"><a href="#">Link 1-1</a> </li>
</ul>
</li>
</ul>
</div>

css_menu class is the one that is used mainly to create sub menu.
But mainmenu and submenu classes are just to apply styles for the menu items.
#css_menu li
{
list-style: none;
position: relative;
}
#css_menu ul ul
{
position: absolute;
top:0;
left:5px;
visibility:hidden;
}
#css_menu ul li:hover ul
{
visibility:visible;
}
.mainmenu
{
background-color:#EDC8FF;
width:60px;
padding:5px;
}
.submenu
{
background-color:#EDC8FF;
width:60px;
padding:5px;
left:30px;
}
a
{
font:italic bold 12px Georgia, serif;
color:Green;
}

‘a’ class is applied to all tags. U can set class for anchor tag in menu and can apply the styles of this a tag.

Output:
clip_image001