I realise there are a lot of questions like this already, but I can't seem to get them to work for me....as most of the solutions target a 'nth-child' or (with my extremely 'newbie' skills) I just don't understand how it works.
I am attempting to make a 'Deal or No Deal' game for an assignment. I'm spending way too much time making it look good, and this is where my problem arose.
I wanted to make the 'Deal or No Deal' sign using CSS. Unfortunately, to get my 'OR' to rotate I can't seem to use 'inline'.
This is my current attempt on JSfiddle
I have tried using a span
element, that wraps around the 'OR' to rotate it, I attempted to change the H1 elements to LI elements (to use the nth-child solution suggested in other answers) but that didn't work either.
Can anyone point me in the right direction?
HTML
<center>
<h1 class="deallogo"> Deal </h1><h1 class="orlogo">OR</h1><h1 class="nodeallogo"> No deal </h1>
</center>
CSS
h1 {
display: inline;
}
.deallogo {
background: linear-gradient(#685300, #E6B800);
border: black solid 1px;
width: 80px;
}
.orlogo {
color: white;
background: black;
border: black solid 1px;
width: 60px;
transform: rotate(270deg)
}
.nodeallogo {
background: linear-gradient(#685300, #E6B800);
border: black solid 1px;
width: 128px;
}
,
,
,
HTML Inline Elements
Inline elements are normally displayed without starting a new line.
Examples: , , ,
, etc
– Feroza Sep 11 '14 at 05:54