1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

need HTML and CSS help

Discussion in 'Styling and Customization Questions' started by erich37, Jun 9, 2011.

  1. erich37

    erich37 Well-Known Member

    I do have an information text box at the top of the Forum-page (the box which we all name Welcome-block).

    So I have this code, whereby this text is left-aligned.

    <div class="importantMessage">
    <div align="left">
    <b>Welcome to this Forum, text bla bla bla</b><br /><br />
    <b>this is some description text 123456</b><br />some other text description 789abc<br />
    I want to also insert an image into this box, which should be right aligned.

    What would be the proper HTML and/or CSS so to have the text left-aligned and the image right-aligned? Well, so that it would look nice and clean, meaning having the text left and the image at the right ?

    Many thanks!
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Moved from tips, tricks & guides.

    <div style="float:right">image code</div>

    That should do it.
    Ideally though you would create a class and not use inline styling.

    You don't need the align left div as content automatically aligns left.

    This should help you construct the code: http://www.w3schools.com/css/tryit.asp?filename=trycss_float
    erich37 likes this.
  3. erich37

    erich37 Well-Known Member

    where to find the CSS in XenForo for this class:

    <div class="importantMessage">
  4. Brogan

    Brogan XenForo Moderator Staff Member

  5. erich37

    erich37 Well-Known Member

    searching within templates for "importantMessage" does not give any results....
    where do I search for this ?
  6. Brogan

    Brogan XenForo Moderator Staff Member

    It returns 5 templates for me:

    You may need to upgrade to the latest version.

Share This Page