Jump to content


Photo

Share properties

#css

  • Please log in to reply
3 replies to this topic

#1 stirrah

stirrah

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 27 October 2013 - 12:25 PM

Hey!

 

I have a (simple) question. This is my code:

nav {
    float:left;
}
nav ul {
    margin:0;
}
nav ul li {
    display:inline;
    margin-right:10px;
}
nav ul li a {
    text-decoration:none;
}
nav ul li.current {
    font-weight:bold;
}
nav ul li a.last {
    border-right:0;
}

I want to have something called "nav2" to share ALL of nav properties, except the float: left that should instead be float:right.

How can I achieve this?



#2 Irate

Irate

    Advanced Member

  • Members
  • PipPipPip
  • 358 posts
  • LocationHamburg, Germany
  • Age:17

Posted 27 October 2013 - 01:07 PM

You should try SASS / LESS.
Quod placet mihi non placeat tibi. - What I think to be good must not always equal your perception of it.

I am not perfect. I try a lot with the code I provide and I don't guarantee for it to work as I have mostly no option to test it on my mobile phone. I do apologize for any inconvenience I caused, but if I do happen to have helped, liking my posts or marking them as to have solved or answered your question would be nice.

#3 stirrah

stirrah

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 27 October 2013 - 02:34 PM

You should try SASS / LESS.

 

Okey, so it's not possible in CSS3?



#4 Irate

Irate

    Advanced Member

  • Members
  • PipPipPip
  • 358 posts
  • LocationHamburg, Germany
  • Age:17

Posted 27 October 2013 - 03:30 PM

Possible, yes, but it's easier in SASS/LESS.
After all, SASS and LESS compile into CSS3 stylesheets.
Quod placet mihi non placeat tibi. - What I think to be good must not always equal your perception of it.

I am not perfect. I try a lot with the code I provide and I don't guarantee for it to work as I have mostly no option to test it on my mobile phone. I do apologize for any inconvenience I caused, but if I do happen to have helped, liking my posts or marking them as to have solved or answered your question would be nice.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com