The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS problem placing 2 images and 1 text on same line.

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #146553

    HI i need some help, i need to place one image on the left, followed by the text and finally the second image on the right. here my code:
    I manage to make both image appearing. but i need to insert a text in the div tag subhead so that the second image to be displayed. how to solve this issue? i want it to be displayed without entering text in the div tag.

    Here my css file:

    `#header{width:60%; float:left; margin-bottom:10px;
    background: transparent url(‘../images/pharmacy’) no-repeat;}

    subHead{ width:40%; float:right; margin-bottom:10px; height:55px;

    background: transparent url(‘../images/medcine.jpg’) no-repeat;}`

    my .jsp file:

    <jsp:directive.include file=”/WEB-INF/sitemesh-decorators/include.jsp”/>

    <div id="header" >
        <h1 class="headerTitle"><fmt:message key="application.title"/></h1>    
    <div id="subHead"><h3>a</h3></div>
    <div id="login" style="width:100%"><jsp:include page="/WEB-INF/sitemesh-common/login.jsp" /></div>

    Can you make a Codepen?

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.