Solved

CSS layout

Posted on 2010-08-26
9
183 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
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.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

810 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