I have a div with this style:
#slogan{ font-size:24px; position:absolute; left:0; right:0; margin-left:auto; margin-right:auto; }
The last 4 styles simply center the contents of the div on the page.
If the page gets too large, I no longer want to use the following style, so I apply this style:
@media only screen and (min-width: 941px){ #slogan { font-size: 24px; position: absolute; min-width: 810px; text-align: right; } }
Which displays the contents of a certain amount from the left edge of the page. I tested these styles in the f12 dev tool and it looks right. However, when I apply the style inside the css sheet, the marginal and right / left parts still apply to the element, and I don't know how to cancel them (there is no default value for the field).
Any help?
source share