I'm using CSS on a new intranet i'm making, and so far it's been working really well. However, i'm having a few problems with my picture browsing / uploading directories.
When a user uploads a picture, i'm using PHP to resize the image and display a thumbnail. However, the CSS seems to be going a bit screwy - sometimes it's okay, sometimes it's all over the shop, as hopefully the image i've attached will show. The html is being generated okay, with <h1>giving me the title bar and <div id="subsection"> doing the grey background bit okay. This is the HTML that's generated for the page in the picture
So there's only one div for each bit etc - so why are there additional lines and boxes over the place? Could it be something to do with because the images are auto generated it doesnt know how big they're going to be? Or is it an IE 6 thing that i can get a patch for somewhere?
Please help - I dont want to question my new found love and belief for CSS!
Perhaps it has something to do with having two DIVs with the same ID (subsection). All ID's must be unique. The way you are using it, you should use a class instead. Reserve ID for scripting or linking purposes.
That's what I've posted. hence why I said
[QUOTE]the HTML that's generated for the page is...[QUOTE]
I've corrected taking the form out of the <p>, but I still have the problem with the line across the photo. I'm sure it's an HTML problem since there are probelms if i draga window over the top of it (see attached file) - you can see where when i've dragged the window over the top it's not replaced the grey background. IS it because I've coded the CSS wrong though, or is it likely to be an IE problem?
ah well this is really odd. Knowing as little as i do about CSS (And i think we'll all agree, i know very little) I took on board what was said about class and id, i did a search and read people's helpful comments on the matter and made the appropriate changes.
That didnt really make much difference, so in an attempt to increase the gapo between the two bits i tried including another <div> and <div> exactly around the current ones - and it's working. Anyone know why? and regardless, I'm assuming that there's something wrong with teh way I've coded it so if someone could point that out too I'd be very grateful.