/    Sign up×
Community /Pin to ProfileBookmark

Trouble fitting image into cell

I have been trying for a few days now to fit an image into a cell at the top of my web site. I made the image the exact same size as the cell and when I preview it in a browser it looks much smaller. I looked at the size of the cells and they seem to be fine. I’m not sure what the problem is. I was wondering if someone can help me out.

Here’s a link to my site.

[url]http://www.nicolecairns.com/HoodGroup/new_index_2.htm[/url]

the image I’m having trouble with is purple. You can’t miss it!

to post a comment
Full-stack Developer

8 Comments(s)

Copy linkTweet thisAlerts:
@chrismartzOct 06.2004 — i looked at your coding and could only see that you are putting both the flash image and the purple image in the same <tr>. based on the height of the tallest image is what the whole table row is doing. also...your image seems to be that size....what is exactly wrong?
Copy linkTweet thisAlerts:
@nycciceeauthorOct 06.2004 — Thanks for replying to my thread!

On my browser I see blank space on both the right and left sides of the purple image. What I'm hoping to do is have the purple image fit the cell completly with no blank space around it.

Are you seeing it differntly on your computer?

(I'm just leaving my office but will look at your response in aprox. 20 minutes)

Thanks again.
Copy linkTweet thisAlerts:
@zachzachOct 06.2004 — [i]Originally posted by sirhcchris3 [/i]

[B]i looked at your coding and could only see that you are putting both the flash image and the purple image in the same <tr>. based on the height of the tallest image is what the whole table row is doing. also...your image seems to be that size....what is exactly wrong? [/B][/QUOTE]

Go chris! :p

*Back on topic now*

Uhg. Tables and junk. Go to CSS, please.

http://www.webdeveloper.com/forum/showthread.php?s=&threadid=44403

Read all of that. Yes, I know, Its long.
Copy linkTweet thisAlerts:
@nycciceeauthorOct 06.2004 — Either I'm really tired or you just resent me your initial reply. Are you suggesting that I read it again?

What I was wondering is if you see the spaces around the image like I do. And if so perhaps you know how to correct this problem.


Thanks
Copy linkTweet thisAlerts:
@DaveSWOct 06.2004 — What ZachZach is saying is that CSS is the favoured solution for layout, as opposed to tables.

However CSS can probably solve your problem here too. I haven't looked at the code, but from what's been said putting the purple jpeg as a background appears to be a solution.

<td style="background: url(purpleimage.jpg) center no-repeat;">td contents</td>

Just make sure the purple image is bigger than the cell.

edit: having just visited the site it would be even easier to use:

<td style="background-color: #000000">td contents</td>

Replace #000000 with the hexidecimal code of the color you want.
Copy linkTweet thisAlerts:
@nycciceeauthorOct 06.2004 — Thanks so much for making the solution more clear to me. My problem is a combination of being a bit of a newbie and to many late nights at the office!
Copy linkTweet thisAlerts:
@DaveSWOct 06.2004 — Try drinking more coffee. j/k ?
Copy linkTweet thisAlerts:
@nycciceeauthorOct 06.2004 — Starbucks is my best friend!!!
×

Success!

Help @nyccicee spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...