Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css not updating on screen- cleared cache, changed browsers, etc

I've got kind of an odd problem. Regardless of what I do to the css to style .blurb, nothing changes on screen. I've cleared cache in 3 browsers(FF, Chrome, Safari) and yet no changes seem to have been made to the live site.

I am trying to have .blurb centered within the container, so that regardless of what the text says, there will be equal space on it's right and let side.

Currently, I am using the following:

.blurb {
    padding-bottom: 100px;
    padding-top: 100px;
    margin: 0 auto;
}

.blurb p {
    font-family: alexandria;
    font-size: 193%;
    font-weight: normal;
    line-height: 1.5;
}

<div class="blurb">
    <p style="text-decoration:underline;color:#f20000;"><span style="color:#282828;">You look like you could use a massage.<br />BodywoRx is here to help.</span></p>
</div><!-- end blurb -->

To clear up some confusion, I have 2 related questions.

1. I can't see live changes made to CSS regardless of what I've done by way of clearing cache, changing browsers, etc.

2. The change I am needing to see is .blurb centered within the container, so that regardless of what the text says, there will be equal space on it's right and let side

like image 621
AMC Avatar asked Mar 26 '26 18:03

AMC


1 Answers

<p> is a block-level element. As such, it will take up the entire width of the container, unless its width is fixed. You can center inline elements, such as <span> tags, by making the parent have text-align: center. To make the <span> have text-align: left, use display: inline-block.

<p class="blurb">
    <span>
        You look like you could use a massage.<br />BodywoRx is here to help.
    </span>
</p>

CSS:

.blurb { text-align: center; }
.blurb > span { text-align: left; display: inline-block; }

See: http://jsfiddle.net/Wexcode/h2njQ/

like image 111
Wex Avatar answered Mar 28 '26 10:03

Wex



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!