WordPress.org

Ready to get started?Download WordPress

Forums

Wierd CSS / HTML Behaivor? (4 posts)

  1. Underpants
    Member
    Posted 4 years ago #

    Hi All,
    Ive been working on my new theme for a game fansite using wordpress as CMS because i really like wordpress its easy and great.
    Iam not 100% expert in CSS & HTML im learning of the W3Schools site.

    So here is my finished Theme http://bad-company2.com/
    But I have problems like: I dont have control over the Images.
    They wont center they wont be align to right.

    I added this part into the CSS because when i dont put this in the text wont wrap on sides on the image.

    img{
    	float: left;
    	margin-right: 10px;
    	margin-bottom: 4px;
    	border: 0px solid #000;
    }

    So after all when i add a image to a news post the title bar and news text is wrapping around the image of the post above, that means the whole layout will be screwed at that part.

    Is here a exper or well skilled CSS/HTML dude that can help me out.

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Get rid of that CSS and try adding:

    .aligncenter {
    	display: block;
    	margin-left: auto;
    	margin-right: auto;
    }
    .alignleft {float: left;}
    .alignright {float: right;}
    img.alignright{margin-left:10px;}
    img.alignleft{margin-right:10px;}
    img {margin-bottom: 4px;}

    Then use the Left/Right/Center alignment options when inserting images.

  3. Underpants
    Member
    Posted 4 years ago #

    Thanks! It worked, had to do some tweaks on ur css part like borders n stuff but its working great now Also w3c validated right now.

    But the pages with embedded stuff gives errors but i think thats normal

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    It is. Strictly speaking embed is proprietary markup (originally from Netscape, if I remember correctly) but whilst IE7 is still hanging around, it's still the most accessible, cross-browser, method for embedding media.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.