473,507 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS: Container height being reset.

nathj
938 Recognized Expert Contributor
Hi,

I have been working on a redesign of a site. this is a site that was developed by someone else and the CSS has been built to fit with the CMS that they supplied.

This redesign is nearly complete - and is fairly simple. there is one area of trouble though. the #container on the site is set to height 100% but, in FF it is resetting itself to 551px!

The site in question is www.vardyfoundation.com and if you load this in IE7 and look at the Projects->International Page you will see that the central container runs all the way down.

Within this central container is a main content holder - #body_page_column_a which in FF overshoots the #container - take a look .

Then if you load the site in Opera or Safari on Windows the results are even weirder.

I have spent a large part of today pulling my hair out over this issue and would really love some help with it. I have posted the 2 CSS references I made above, if you need more code either give me a shout or use your preferred web developer features in your preferred browser.

Expand|Select|Wrap|Line Numbers
  1. body {
  2.     font-family: verdana, sans-serif;
  3.     font-size:    12px;
  4.     color:    #333333;   
  5.     background-color: #d7d7d7;
  6.     background-image: url(../graphics/imagery/vf_bg_brushedsteel.png);
  7.     background-repeat: repeat-x; 
  8.     padding: 0px;
  9.     margin: 0px;        
  10.     margin-top:10px;
  11.     margin-bottom:20px;      
  12.     height: 100%;
  13.     text-align: center;
  14. }    
  15.  
  16. #container {   
  17.     width: 800px;                     
  18.     margin: auto; 
  19.     overflow: visible;
  20.     height: 100%;     
  21.     border: 2px solid #dcdcdc ;
  22.     background: #ffffff;
  23. }
  24.  
  25.     #body_page_column_a {  
  26.         width: 590px;       
  27.         padding-top: 10px;
  28.         float: left;        
  29.         text-align: left;                 
  30.         margin-left: 12px; 
  31.         background: #ffffff;
  32.     }
  33.  
Cheers
nathj
Sep 23 '08 #1
12 3754
David Laakso
397 Recognized Expert Contributor
Considering the doctype and that there are 2340 markup validation errors it is a wonder it shows up on the screen in any browser.
Sep 23 '08 #2
nathj
938 Recognized Expert Contributor
Considering the doctype and that there are 2340 markup validation errors it is a wonder it shows up on the screen in any browser.
I am aware of all the errors, however, I do not have the capability to change them as the code was not written by me and is generated by a CMS.

Personally I adhere strictly to standards and see their worth in web development. That said failing to comply with standards shouldn't prevent a site from displaying at all (just correctly - hence there are lots of fudges if you look into it - not written by me in the first instance) - they're not the same thing as compile errors.

Other than this comment on standards do you have any other helpful advice?

Cheers
nathj
Sep 23 '08 #3
David Laakso
397 Recognized Expert Contributor
Other than this comment on standards do you have any other helpful advice?
nathj
Not really. Try:
Expand|Select|Wrap|Line Numbers
  1. #container {   border: 1px solid fuchsia;    
  2.     width: 800px;                     
  3.     margin: auto; 
  4.     overflow: visible;<---------delete
  5.     height: 100%;<--------------delete     
  6.         overflow : hidden;<---------add
  7.     background: #ffffff;
  8. }
  9.  
  10. And add the following:
  11.  
  12.  
  13. #container:after {
  14. content : '.';
  15. display : block;
  16. height : 0;
  17. clear : both;
  18. visibility : hidden;
  19. }
  20. #container {
  21. display : inline-block;
  22. }
  23. #container {
  24. display : block;
  25. }
  26.  
  27.  
  28.  
  29.  
Sep 23 '08 #4
drhowarddrfine
7,435 Recognized Expert Expert
This wins the prize as the page with the most errors I have ever seen. The previous record was around 2100 or so html errors. (Which led to an edgy thread which was stuck to the top of this board for quite a while.)

The markup even starts off on the wrong foot by not putting a doctype on the first line. This puts IE into quirks mode and right away you can't get it to perform like modern browsers. So you have an uphill battle right there.

In addition, the validator can't parse the tags due to improper use of tags so how can the browser? The fact that it works in IE is pure luck and nothing else except they obviously only looked at IE when it was originally written.

David's comments were hardly about standards as they are about writing proper code that all browsers understand. You can't count on errors to work the same everywhere now or in the future and all browsers to guess the same way.

I spent a few minutes to see if I could narrow it down to the one box you mention but changing one thing here flipped everything else around there and it quit making sense, not that it did before. It looks more like the flow of things isn't quite right and you're trying to get the CSS to fix it. I see you using 'overflow' but I'm not sure there are floats in the right spot to fix it.
Sep 23 '08 #5
David Laakso
397 Recognized Expert Contributor
Incidentally, the above CSS (opening it to enclose the floats and whatever all that garbage is using the "easy clearing" method) was done "live" in Mac FF/3.01. Chances of this actually working are about slim to none.
Sep 23 '08 #6
eWish
971 Recognized Expert Contributor
Wow, that's more error then I have lines of HTML on the average. It would be nice if the CMS you were using followed web standards.

--Kevin
Sep 24 '08 #7
nathj
938 Recognized Expert Contributor
First of all I am really keen to distance myself from the original author on this project. I did not write the HTML, I did not write the original CSS. I am forced into using this. Normally I write sites myself in PHP and follow standards for everything - I validate and the sites I write pass validation.

One question is which validators do you use - I want to make sure the sites I write adhere to standards - they all look the same on IE6,7 FF 2,3 (windows and Linux) Opera, Safari (on windows and Mac) and Chrome. So really this is not an example of 'doctor, my friend has a rash', I really did not write this. as such I am stuck with trying to make it work within the system I have been given.

I will have a play around with the suggestions you all made - as far as I can and let you know how I get on.

Thanks for taking the time to stop by and offer some wisdom.

Cheers
nathj

PS On the plus side I did just win 'most errors' award
Sep 24 '08 #8
nathj
938 Recognized Expert Contributor
Whilst still maintaining distance (I know this is growing suspicious now isn't it) I have "fixed" the display issues I asked about - thanks for the CSS tips.

I use "fixed" in the loosest possible sense because if you run the code through validation then you will see that it is positively riddled with errors. I am going to raise this issue with chap who developed it and see if he can release a new version of his system that passes validation.

When I say "fixed" I mean it displays in roughly the same way in the main browsers - basically it is acceptable to the boss and I have other projects to work on, plus I'm on holiday next week.

So, thanks for all your help and the discussion on standards was good - has anyone read this article?

Cheers
nathj
Sep 24 '08 #9
David Laakso
397 Recognized Expert Contributor
Yes, I read the article. And, no, I do not have any difficulty sleeping at night. Do you have a CSS/(X)HTML question you forgot to ask?
Sep 24 '08 #10
nathj
938 Recognized Expert Contributor
Yes, I read the article. And, no, I do not have any difficulty sleeping at night. Do you have a CSS/(X)HTML question you forgot to ask?
I just thought the article was an interesting contribution the more general side of the discussion. I had no further questions as the site is now displaying as it should where it should. It's still full of errors that I would rather weren't there but short of re-writing the site myself that's not going to change. As I got someone else to do it because I was too busy and the deadline was before I was asked to get it done a re-write is highly unlikely.

Thanks to everyone for the help, the CSS you posted got it 'working'.

Cheers
nathj
Sep 24 '08 #11
drhowarddrfine
7,435 Recognized Expert Expert
So, thanks for all your help and the discussion on standards was good - has anyone read this article?
I'll tell you a few things about Molly since she and I occasionally scream at each other. Molly knows how to be politically correct. Molly believes in web standards. Molly thinks Microsoft is so mired in their own poo-poo that they will never get out and management there truly doesn't have a clue or cares. Molly thinks more problems are caused on the internet by Microsoft than anyone and anything else mentioned in that article.

Those are the things she will tell you if you catch her at the right moment.
Sep 24 '08 #12
nathj
938 Recognized Expert Contributor
I'll tell you a few things about Molly since she and I occasionally scream at each other. Molly knows how to be politically correct. Molly believes in web standards. Molly thinks Microsoft is so mired in their own poo-poo that they will never get out and management there truly doesn't have a clue or cares. Molly thinks more problems are caused on the internet by Microsoft than anyone and anything else mentioned in that article.

Those are the things she will tell you if you catch her at the right moment.
That's interesting - I'm sure there are lots of people who share that opinion even without the inside information. I know when I develop my own site if I scream at anyone or anything its MS and IE.

I think if we are to get anywhere with web standards we have to believe in them, we have to implement to them and we have to do what we can to drive them forward.
Sep 24 '08 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

27
2600
by: Neil Monk | last post by:
(sorry for x-post but news://macromedia.dreamweaver seem unable to help, which I find astounding.) Hi, I'm VERY new to DW MX 2004 (opk then, I'm new to DW..period!) I'm sipmly trying to do the...
3
1544
by: Brian Henry | last post by:
I am having a wierd problem with IE in CSS... I have a footer that is locked to the bottom of the page with the bottom attribute set to 0px so it is 0px from the bottom. but when you view the page...
4
8653
by: Dave | last post by:
TIA for the help.....this should be easy for a pro....I need the two divs with text to display on the same line at the top of the container..??? <html> <head> <style> body...
11
2505
by: Benny123 | last post by:
Im very new to the who css lark so am struggling quite a bit. ive managed to build a basic div centred box with css embedded in my html. It looks fine in IE but loses all size in firefox. Any...
6
1500
by: sooshi | last post by:
Hi all, The height of my page needs to be flexible as the page contains columns with lists which can vary in length. I also have a footer which needs to be stuck to the bottom. I managed to do...
27
3830
by: GloStix | last post by:
WARNING VIDEO TAKES A WHILE TO LOAD http://screencast.com/t/BWQ6DNtsM I really don't know how to fix this other than putting another div. But I dont' exactly want to do that for every page....
1
1627
by: sharkyboy | last post by:
Hi, I am developing a microsite on the end of our current church website. See www.the-ark.net/chooseblue I built the site using css/html then plugged it in to the existing asp cms we have. ...
3
2001
by: Steve | last post by:
Hi All I have an asp.net 2.0 website with the following css file It uses Master pages and in Firefox 3.04 for windows only, 3 of the web pages don't display the Master page properly The...
8
5118
by: azjudd | last post by:
Thank you in advance for your help on this one. I'm using named anchor tags on a FAQ page with questions listed at the top and answers below; a standard jump-to feature. However, anytime an anchor...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7034
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5045
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1544
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.