Jump to content

Size matters!


Baggy

Recommended Posts

I am working on some appearance/content improvements to our existing site, whilst I convert it to CSS later (when I've learned how!)

 

In the meantime I want to upload some changes to the existing site but have discovered a fundamental problem:-

 

There is a disparity between widths of the header and the page body, even though Dreamweaver says they are both 750px wide. I can see a figure of 756 in brackets after the 750 and don't know what this means?

 

As this affects almost every page on the site (as I'm using one page like a template for all others), I really must fix it.

 

I know I should have noticed this before but, in my defence, the page and background (margins) are the same colour, so it isn't immediately apparent. What has highlighted it is the attempt to put a side shadow down the pages.

 

I would really appreciate some help here please.

Link to comment
Share on other sites

I don't use Dreamweaver and you haven't shown your code, but at a guess I would say that the basic div width is 750px and either padding or margins or borders are increasing the total width to 756. Are your shadows each 3px wide?

 

Reduce the div width to 744px and, assuming that there's nothing inside the div which exceeds 744px like an image or several inner divs, you may correct the problem.

Link to comment
Share on other sites

General rule of webdesign: If something isn't right, obviously, something is wrong.

 

Ok - I just made that up, but what I'm trying to say that without seeing what you have it's even hard to guess - a link is best, if that's not possible, at least paste the (entire) code. Link is much better so, because if there are images involved, having just the code may not be enough to understand what a possible problem with those may be.

 

One guess to about your issue: the actual width of a container is determined by border, padding, and possibly content - so a 750px wide box with a 2px border and 10px padding all around is actually 774px wide.

Link to comment
Share on other sites

Your different table column widths are inconsistent.

 

Where the spacer images appear your total widths are 245, 5, 375, 8 and 117 = 750, but then there are 5 x 5px width added to give a total of 775px.

 

The 3 pictures that show up have the following widths 245, 250 and 245px but in your code you have allocated 245, 5, 350, 8 and 250px = 858px the 5 and 8 widths being the space between the images.

Link to comment
Share on other sites

We don't beat people up, for that we send Guido, Ian or Anatolly depending on which side of what country you live in. :D But it should really be a priority, so instead of fixing it... why not just build it new with CSS? Why spend time fixing something you wish to replace anyways?

Link to comment
Share on other sites

LSW - because the only teaching I've had (a course of evening classes a year ago), was using tables, with no real reference to code - so not a very good course. Apart from that I've just learned a bit by trying.

 

At present, what I know about CSS could be written on a pin head and I need to get stuff live quite quickly, for business reasons. I fully intent to have a go at switching it all over to CSS as soon as I can find time.

 

I just hoped I could fix this one page and use it as a 'template' to get things active for now.

 

I'm in the UK btw, so safe from a beating eh?

Link to comment
Share on other sites

No, that is Ian's area.

 

I am not sure any of us have had "Official Training" with CSS. I learned it by writing it and checking other peoples CSS. It is not hard, just a new way of thinking that "clicks" fairly quickly really. But we do not want to beat a dead horse. It looks worse than it really is. The concept of the layout is the same, you lay out dives like you do tables... just with more freedom and not klimitiing elements like TRs and TDs. I was taught tables too in school as CSS was fairly new and not well supported at the time.

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...