Solved

CSS layout

Posted on 2010-08-26
9
186 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

732 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