Solved

CSS layout

Posted on 2010-08-26
9
184 Views
Last Modified: 2012-05-10
I would like to create a div tags horizontally without the tables  , but i find that if i create a table first and put the div tag in it,it allows me to place the image or text neatly,  what do any one suggest?

0
Comment
Question by:imagekrazy
  • 4
  • 4
9 Comments
 
LVL 9

Accepted Solution

by:
Snarfles earned 500 total points
ID: 33533634
div is a block element which means that it expands across the entire page. In lay mans terms that means you can't have more than one in a row. What you can use instead is the span tag which is only slightly different but allows you to have more than one per row.
0
 
LVL 9

Expert Comment

by:Snarfles
ID: 33533655
You can make a div not block by using some css code.
#yourdivID {
display:inline;
}

Open in new window

0
 

Author Comment

by:imagekrazy
ID: 33534643
okay, but i created a gallery,I attached my code but everything is on the left, i want the left to be the same as the right side  and the whole thing being centered.



 
 
layout.html
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 40

Expert Comment

by:gurvinder372
ID: 33534715
try using float property
eg
div.leftDiv
{
   float: left;
}

div.rightDiv
{
   float: right;
}

<div>
   <div class='leftDiv'>A left div</div>
   <div class='rightDiv'>A right div</div>
</div>
0
 

Author Comment

by:imagekrazy
ID: 33535911
thanks, final question, how do   i get the right side div  to move a little away from the the sidebar1 div tag that i made, i am attaching my code, i tried everything
thanks
layout2.html
0
 
LVL 9

Expert Comment

by:Snarfles
ID: 33537823
with

.thrColLiqHdr #sidebar1 {

add

margin-right:15px;
0
 

Author Comment

by:imagekrazy
ID: 33538201
I tried that , it didn't work, and i meant the left side , side bar1
0
 
LVL 9

Expert Comment

by:Snarfles
ID: 33538221
Not sure that I understand what you mean then. Could you explain further or provide an image mockup of what you are after?
0
 

Author Comment

by:imagekrazy
ID: 33538330
I am attaching a snap shot in my word doc, my problem is nothing is uniform, if i try to move something over it moves one of the div tags to the right or to the bottom of the page, and i tried to add another  div tag in the first row and that div box moves to the bottom
thank you for your help
layout.docx
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question