Solved

CSS3 can't get scaleX to work

Posted on 2013-12-03
4
325 Views
Last Modified: 2013-12-04
I have the following code below I'm using to test some animations, but the scaleX property doesn't seem to work when I mouseover the buttons (around lines 84). Code is below.  Any ideas on how to get this to work?

<html>

<head>
<style>
header {
    text-align: justify;
    height: 5em;
    /*padding: .9em 2%;*/
    background: #484743;
    color: #fff;
    padding-right:200px;
}

header::after {
    content: '';
    display: inline-block;
    width: 100%;
}

header > div,
header > div::before,
header nav,
header > div h1 {
    display: inline-block;
    vertical-align: middle;
}


header > div {
   /*    height: 100%;*/
}

header > div::before {
    content: '';
    /* height: 100%;*/
}

header > div h1 {
    font-size: 20px;
    color: #363636;
    vertical-align:middle;
    text-align:center;
    padding:1.2em;
}

header > div.logobox {
    background: #c4c4c4;
    height:5em;
    width:6em;
    vertical-align: middle;
    text-align: center;
}
header nav a {
    padding:2.5em;
    line-height: 3em;
    white-space: nowrap;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #ffffff;
    text-transform: uppercase;
    text-decoration: none;
    vertical-align: middle;
}

header nav a:hover {
    color:#484743;
    background-color:#f2f2f2;
   -webkit-transition: background .7s ease-in-out;
   -moz-transition: background .7s ease-in-out;
   -ms-transition: background .7s ease-in-out;
   -o-transition: background .7s ease-in-out;
   transition: background .7s ease-in-out;
}

header .linkbox {
/*    background: #252525;*/
    height: 4em;
    display: inline-block;
    vertical-align: middle;
    padding: 1em 1em 0em 1em;


   -webkit-transition: scaleX(1.5);
   -moz-transition: scaleX(1.5);
   -ms-transition: scaleX(1.5);
   -o-transition: scaleX(1.5);
   transition: scaleX(1.5);
}

header .linkbox:hover {
    background: #444444;
    vertical-align: middle;


}
</style>

</head>
<body>

<header>
    <div class=logobox><h1>Logo</h1></div>
    <nav>
        <div class=linkbox><a href=#>Test 1</a></div>
        <div class=linkbox><a href=#>TEst 2</a></div>
        <div class=linkbox><a href=#>Test 3</a></div>
    </nav>
</header>

</body>
</html>

Open in new window

0
Comment
Question by:saturation
  • 2
4 Comments
 
LVL 51

Accepted Solution

by:
Julian Hansen earned 500 total points
Comment Utility
Try changing transition => transform
0
 

Author Closing Comment

by:saturation
Comment Utility
Worked perfect--I overlooked it, thanks!.  

JulianH, I'll put code tags around next time.
0
 
LVL 51

Expert Comment

by:Julian Hansen
Comment Utility
You are welcome - thanks for the points.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now