Jump to content
psycoperl

Creating layout design in w3.css

Recommended Posts

Hello... I am trying to design a sticky header bar for my project. While I have already got the sticky bar working, I am now trying to create a better layout of the content on the bar using CSS (w3.css or standard css). 

I cannot figure out how to achieve this. Any suggestions?

What I would like to have (w/out the borders) is:

image.thumb.png.c18ccd3d062849fdfca5f9ec6e91a3d1.png

<table style="width:100%">
	<tr>
    	<td rowspan="3" width="50%">
        	<img src="img_lights.jpg" style="height:70px;width:350px" alt="logo_plc_holder">
        	<h3>PageTitle</h3> 
        </td>
        <td align="right"> 
        	Smith
        </td>
    </tr>
    <tr>
    	<td align="right">
        	Jones 
        </td>
    </tr>
    <tr>
    	<td align="right">
        	Logout 
        </td>
    </tr>    
</table>

what I have got so far... (but is not working as intended)...

image.thumb.png.c0e05820a4d72a0aa7987fc73406fafb.png

<div class="w3-row ">
	  <div class="w3-half">
          <img src="img_lights.jpg" style="height:70px;width:350px" alt="logo_plc_holder"><br /><h3>PageTitle</h3> 
      </div>
      <div class="w3-half"> 
      	<div class="w3-row" style="float:right;"> Smith </div>
      	<div class="w3-row" style="float:right;"> Jones </div>
        <div class="w3-row" style="float:right;"> Logout </div>
      </div>
</div>

 

Share this post


Link to post
Share on other sites

Instead of float:right, use text-align:right.

I'd recommend using a stylesheet for your CSS instead of style attributes.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...