• steve02a

    (@steve02a)


    Here is some code I’m using in a WP page. Notice the align=”right” inside my <div> tag. This text is overlaying on a image. The overlay works well, however, my text is always on the left. Does WP just not like the align=”right” tag? For the life of me, I can’t get that text to go on the left. Maybe I’m using the wrong tag? I don’t know…

    <table style="width: 413px;">
    <tbody>
    <tr>
    <td style="background: url('image/ambassador-05.jpg') top left no-repeat;" valign="top" width="413" height="226"> 
    <div class="text1" style="width: 160px; margin: 19 0 0 233px;" align="right">
    <h5>Business Services:  (800) 555-5555 ext. 999.</h5>
    </div>
    </td>
    </tr>
    </tbody>
    </table>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button.]

    Thanks in advance for your help….

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    (@esmi)

    Why are you using a table for layout? Tables are for data – not presentation. You should be using CSS. And align="right"? Again, you should be using CSS. Finally I’m willing to take a reasonable bet that there’s no H4 on your page before that H5 tag either.

    In short, you really need to re-think your whole approach.

    Thread Starter steve02a

    (@steve02a)

    Esmi,

    Thanks. Yes, I know this code is horrible and it should be 100% re-worked. I’m not a whiz w/CSS though….I have my struggles every now and then (and yes, there is no <h4> before the <5>).

    How would you re-work this into css? One issue I have is I’m using one style sheet that comes w/a template I’m using for a WP site I’m doing. I’d have to be careful with tags in CSS to not reuse one I’m using already.

    If you’re willing to get me started on the CSS to rework this, I’d be most appreciative and take it from there.

    Thank you so much

    esmi

    (@esmi)

    Bearing in mind that I don’t know exactly what you are trying to achieve, something like:

    <div class="services">
    <span>Business Services:  (800) 555-5555 ext. 999.</span>
    </div>

    CSS:

    .services {
    	background: url('image/ambassador-05.jpg') no-repeat;
    	width:413px
    	height:226px;
    }
    .services span {
    	display:inline-block;
    	width: 160px;
    	margin: 19px 0 0 233px;
    	text-align:right;
    	font-weight:bold;
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Does WP not like the align="right" tag??’ is closed to new replies.