Can anyone look at this code [code 39] [px]
Q: This is a page from my site and when clicked, the page opens, but requires side to the other scrolling.
We already tried changing the code 99% to 800 px without all luck.
Thanks help you have.
Heres the code:
Best Answer: First, try snipping 'using namespace std;' out of every function and putting one copy of it up near the top, just after the #include line. Even if that doesn't fix your problem, it will make your code a little more readable.
Second, for(i=0;i<20;i++) is adequate for an array of length 20, not length 19, yet you are using an array of length 19. On the 20th iteration of this for loop, you will either get a segmentation fault or end up overwriting a section of memory you didn't want to overwrite, possibly also causing a crash or some kind of strange behavior. Try either setting the size of the array to 20, or the length of the loop to 19.
Third, why are you using a multidimensional array if the second dimension is only of size 1 anyway? Why not just have a 1-dimensional array and pass a pointer and the array size to the read() and print() functions? Also, are you sure you're initializing your array properly?
Fourth, you don't need to specify the return type of a function when you call it. For these two lines:
void read (int pupilHeight[][1]);
void print (int pupilHeight[][1]);
try removing the 'void ' at the beginning of each line.
Re:Originally posted by: guy
yep, the AT code view has a bug
it converts the & n b s p ; to a real space character
fix it in your code, and i think you'll be set.
Works great now. Thank you.
Re:yep, the AT code view has a bug
it converts the & n b s p ; to a real space character
fix it in your code, and i think you'll be set.
Re:where it outputs the page numbers in brackets, change the non breaking space to a regular space
your code shows a regular space, but its output as a & n b s p ; (without spaces)
Re:Thanks for everyone's help.
Re:The HTML code of the site being sent to the user (you can not use less-than or greater-than signs in CSS files).
Somehow you need to set the margin and padding properties of the body tag to zero. Whether that entails editing the PHP or HTML, I don't know, that depends on if the PHP is writing the body tag or if there's HTML somewhere.
What is the code listed in the OP? It is PHP of some sort, but it looks like it's in the middle of the page somewhere. Where are the HTML and body tags written out?
Upon further examination, the problem actually lies somewhere within the CSS code. I can view the site without the CSS and I have no scrollbar problem.
BODY {
font-family: verdana;
}
When the font-family element (above) from the CSS is removed, it works fine. So, I believe the problem stems from different font sizes in your page.
Re:Originally posted by: guy
No,
At the top of which page? The .css page or the main page?
Re:Originally posted by: guy
Oh, you need to eliminate the margins and padding at the top of the page. CSS styles: "margin: 0 0 0 0; padding: 0 0 0 0"
This?:
DIV.history {
border: 0;
height: 100%;
width: 100%;
align: middle;
}
Re:Oh, you need to eliminate the margins and padding at the top of the page. CSS styles: "margin: 0 0 0 0; padding: 0 0 0 0"
Re:Originally posted by: guy
can you link us to the page? it should be pretty easy to spot whatever is making the table stretch
also, 760 is the max width you can go without a sidescroll for 800×600 users
You bet:
page in question (http://www.goatbased.com/final/ttshout.php?history=1)
I'm probably not going to conform to 800*600 res settings. ![]()
Re:can you link us to the page? it should be pretty easy to spot whatever is making the table stretch
also, 760 is the max width you can go without a sidescroll for 800×600 users
Re:Maybe you need to change the table's CSS overflow property.
Re:No luck.
Thanks though.
I'm set to 1680 wide, btw. If I can't see it without scrolling, we've got a problem!
Re:eos,
Not trying to be a smart-aleck here, but if the monitor's maximum resolution is 800×600, is there any chance that the pixels that make up the frame of the window and the scroll-bar are keeping you from getting the 800 pixel (or 99%) width?
What would happen if you set it to, say, 780?
Related posts
Tags: code 39, px