Solved

html - created site in dreamweaver (tables) - layout different between browsers.

Posted on 2008-06-21
5
199 Views
Last Modified: 2010-04-25
Hi,

I created a page in dreamweaver using tables for layout and CSS rules for the colours etc; its more or less 'ok' apart from my 'logo.jpg' (logo image) appears in a different place in Internet Explorer vs Firefox.

I gather using tables is bad practice; but I only know how to use dreamweaver for website.

Any tips for getting layout to render the same on both browsers?

(URL Removed by Asker Request - Jason1178)
0
Comment
Question by:callmecheez
5 Comments
 
LVL 12

Expert Comment

by:nexusnation
ID: 21838700
It's because your table isn't formatted right.  I can't tell whether it is supposed to be two columns total or three, and neither can Firefox or IE.

Make sure you set a width to at least one td in each column.

Also, you have the text-align property set to right on the image.  This is incorrect -- you want to set the text-align property to right on the block-level container (in this case, a table cell) containing the image.

Try that out and see how it goes. If it helps, draw out what your table is supposed to look like on paper, then figure out cell merges etc (colspans and rowspans).

Of course, I'd still encourage you to go to a CSS layout.  You'd be surprised how easy it would be for such a simple layout.
0
 
LVL 3

Author Comment

by:callmecheez
ID: 21838754
Its supposed to have a logo top-right, menu'  down the left, contact details bottom left, content in the black box middle-right.

"Make sure you set a width to at least one td in each column." -Will have a look, but don't know exactly what I'm looking for.

"you want to set the text-align property to right on the block-level container (in this case, a table cell) containing the image." - don't know how / don't understand. . !


Many thanks for the reply, much appreciated!
0
 
LVL 16

Accepted Solution

by:
rbudj earned 500 total points
ID: 21839332
You have to define the width for each table cell.  If you have a table that is 400px wide with two columns and a 10px cellspacing, you must calculate the witdth, allowing for the cell spacing.  So if the table is 400px wide, you cannot have two cells at 200px because you have cell spacing of 10px on both the right and left side so the you must subtract 20px from the overall width.  So one cell can be 190px wide and the other can be 190px wide, or one can be 100px wide and the other 280px wide.  Just keep this in mind when using tables.
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 21839878
"I gather using tables is bad practice; but I only know how to use dreamweaver for website."

no, it is not.  The problem is dreamweaver.  The program uses tables where it should use CSS, and it uses CSS where it would often be better to use tables.  The programmers never got it right.

as rbudj says, if you are doing tables, you have to assign real pixel values to every cell with images, as well as those around it, and if a cell is blank, put a   in it to get it to align correctly.  The total of all cells should be about 90-95% of the width of the table (allowing for padding and margins).  Work with the numbers.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 21842472
>> The program uses tables where it should use CSS, and it uses CSS where it would often be better to use tables.

The program only does what someone tells it to do, scratchy...

If you use CSS, DW uses CSS.  If you insert a table, it uses a table.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

816 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now