Webmaster Forum

Webmaster Forum (http://www.v7n.com/forums/index.php)
-   Coding Forum (http://www.v7n.com/forums/forumdisplay.php?f=16)
-   -   Problem Moving Inline Style To Existing CSS File (http://www.v7n.com/forums/showthread.php?t=428283)

SunEmbroidery 04-02-2018 01:39 PM

Problem Moving Inline Style To Existing CSS File
 
I'm unable to move an inline style for my logo header on an html page to an existing css file. This is the original html:

HTML Code:

<div id="logo">
<span class= "greentext">
<a href="http://www.v7n.com/forums/index.htm" title="Text - Home">
<img alt="Atext Btext Ctext Dtext - Home" src="http://www.v7n.com/forums/javascripts/images/catalog/logo-text.png" style="margin-bottom: -0.9%"></a><br>Atext</span><span class= "bluetext"> Btext</span>
<p class= "whitetext">Ctext</p>
<p class= "bluetextsm">Dtext </p>
</div>

I added a class to the css:
.imgmargin {margin-bottom: -0.9%}

and replaced the inline style with class="imgmargin" to the html.

What am I doing wrong? Thanks!

wmtips 04-04-2018 02:13 PM

Maybe your browser haven't updated earlier cached CSS file, try to press Ctrl+F5 or clean your browser cache

JackMiller7 04-04-2018 09:59 PM

I don't see a problem with what you wrote here, can you post the site so I can use inspect tool to see why the css class may not be calling/functioning

SunEmbroidery 04-05-2018 05:22 PM

I didn't publish the change (I only previewed in a browser) because when I tried the change my green text - "AText" (first word in my business name) turned black and its viewed against a black header so I didn't want every page of my site look that way and I don't want to be penalized for having black text against a black background (hidden text). If you want to visualize the header the site is https://www.sunembroideryscreenprintingdotcom.

SunEmbroidery 04-20-2018 07:53 AM

I managed to fix this. I don't know why it didn't work the first time. Creating the style in the CSS file and replacing the inline style with that class applied to the image fixed the problem.


All times are GMT -7. The time now is 08:24 PM.

3.8.7