Topic: Div Backgrounds Pages that link to <a href="https://ozoneasylum.com/backlink?for=11157" title="Pages that link to Topic: Div Backgrounds" rel="nofollow" >Topic: Div Backgrounds\

 
Author Thread
Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

IP logged posted posted 02-23-2004 19:05 Edit Quote

Hello,

I have a div element with an assigned background image. Within the div block, at the top I have an image which appropriately give the appearance of rounded corners... followed by the content (text) followed by an image which appropriately gives the appearance of rounded cornders (for the bottome of the div block).
The problem is, the backgroundimage for the div elment appears just above and just below (like 3px of it) the images which should "round" the corners.

What am I doing wrong?
If you want to view the sample, here it is: http://mywebmarketer.com/campaign_files/campaign_template.html
(see the bottom dark grey footer, as example)

Thanks!
Karl



[This message has been edited by Karl (edited 02-23-2004).]

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

IP logged posted posted 02-23-2004 19:15 Edit Quote

It looks fine in Netscape. I assume you are looking at the page in InterNET Explorer.




-- not necessarily stoned... just beautiful.

Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

IP logged posted posted 02-23-2004 19:34 Edit Quote

Yes, looking at this with IE 6.0 +

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

IP logged posted posted 02-23-2004 19:44 Edit Quote

Try changing the margin specifier from 'margins' to 'margin'. That is the only thing I see that might be affecting your layout.



-- not necessarily stoned... just beautiful.

Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

IP logged posted posted 02-23-2004 20:00 Edit Quote

Fixed margin specifiers... but still a problem. Uggg..

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

IP logged posted posted 02-23-2004 20:15 Edit Quote

Try this http://positioniseverything.net . You may find an answer there.




-- not necessarily stoned... just beautiful.

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

IP logged posted posted 02-23-2004 20:16 Edit Quote

Tried altering your margins top and bottom to make them 3px higher (or lower, as the case may be)

MedHead
Nervous Wreck (II) Inmate

From:
Insane since: Feb 2004

IP logged posted posted 02-24-2004 06:58 Edit Quote

Why not put the top and bottom curved images in their own div?

Cameron
Bipolar (III) Inmate

From: Brisbane
Insane since: Jan 2003

IP logged posted posted 02-24-2004 15:40 Edit Quote

MedHead, what good would that serve?

Adding extra HTML markup just to fix a display problem... may as well be using tables.

-----

Just quickly.... Dang Karl, what'd ya do to my design! If you can, try and use use the template I provided for the main website.

But if you really want to go with that, this quick and dirty fix should get you up and running:

Add an id="" to the img in question, something meaningfull like id="campaign_main_top_img".

Then add this rule to the style sheet:

#campaign_main_top_img {display:block}

...and technically this isn't a hack, given that the image should be displayed as a static block and not 'inline' with the content.

MedHead
Nervous Wreck (II) Inmate

From:
Insane since: Feb 2004

IP logged posted posted 02-24-2004 20:05 Edit Quote

"MedHead, what good would that serve?

Adding extra HTML markup just to fix a display problem... may as well be using tables."

Well, up until recently, the use of tables was acceptable. And for the most part, it still is.

EDIT: Not saying we shouldn't embrace web standards or upgrade, but fretting over the use of DIVs, and their likeness to how tables are used for layouts is silly. However, since there's an alternative, go for it.




[This message has been edited by MedHead (edited 02-24-2004).]

Cameron
Bipolar (III) Inmate

From: Brisbane
Insane since: Jan 2003

IP logged posted posted 02-25-2004 04:31 Edit Quote
quote:
Well, up until recently, the use of tables was acceptable. And for the most part, it still is.



I have no idea where you're getting that idea from. Who exactly deems something as acceptable? And in what context? I thought we were talking about web standards here.

quote:
Not saying we shouldn't embrace web standards or upgrade, but fretting over the use of DIVs, and their likeness to how tables are used for layouts is silly.



No, it's not silly at all.

Web standards aren't just about not using <tables>s for layouts, if you think that's what it is then I fear you're missing the point.

CSS is about separating display from content. An extra <div> thrown into a page to fix a display problem is defiantly in opposition to this ideal. This is what web standards are all about. CSS is just a technology, like <table>s, how you use this technology is the measure by which I would consider a website to be standards compliant.

[This message has been edited by Cameron (edited 02-25-2004).]

MedHead
Nervous Wreck (II) Inmate

From:
Insane since: Feb 2004

IP logged posted posted 02-25-2004 21:31 Edit Quote
quote:
I have no idea where you're getting that idea from. Who exactly deems something as acceptable? And in what context? I thought we were talking about web standards here.



I would consider W3C as a good source for choosing standards. Tables are still allowed under XHTML Transitional, I believe. How they're used is really the business of the owner of the website, and nobody else.
While XHTML was recommended back in 2000, it hasn't really gained a real foothold even now. Serious designers use that format to follow the recommendations (and it appears, only for that reason, which smacks of elitism), but it hasn't hit the amatuer market yet (for instance, up until Dreamweaver MX, DIV layouts weren't supported by Dreamweaver). For the most part, tables are still here to stay. People can scream about standards all they want, but if nobody uses them, they're not really standard, are they?

quote:
No, it's not silly at all.

Web standards aren't just about not using <tables>s for layouts, if you think that's what it is then I fear you're missing the point.

CSS is about separating display from content. An extra <div> thrown into a page to fix a display problem is defiantly in opposition to this ideal.



Yes, just like tables were. Just like the Internet is now today. The Internet wasn't originally intended for what it is today - does that mean it's bad? Good grief, no need to be anal. DIVs are the structure of the page. He needed a fix, I gave him one. I didn't recall the display: block option - I already said that was a better idea. But you're jumping on me because I (gasp) offered to use another DIV?!

quote:
This is what web standards are all about. CSS is just a technology, like <table>s, how you use this technology is the measure by which I would consider a website to be standards compliant.



An extra DIV will not destroy a page, nor will it make the load time balloon, nor will it look any different in any browser. You're blowing things way out of proportion. "Oh no! He used an extra DIV! I'm never going back to that site ever again! He's not following web standards!111"

Cameron
Bipolar (III) Inmate

From: Brisbane
Insane since: Jan 2003

IP logged posted posted 02-25-2004 23:11 Edit Quote

Dang dude, calm down. This is a discussion forum. People, um, discuss things here.

I'm not jumping on you about anything, merely disagreeing with your point of view. If you don't like people disagreeing with what you say, don't say anything. =)

Anyways, I think the main disagreement here is what web standards are all about. Obviously you see them as a technology spec to be used any which way you want, as long as it works. I however, disagree (no surprises there). I see standards as a way to promote better practices and to better the future of the web. So do the W3C and many others who promote them. Yet now I?ve been called an elitist, and for what?

How does wanting the web to be more usable, accessible and interoperable make me elite?

Yes, <table>s are allowed in XHML, but I disagree with you as to how they should be used. The W3C recommendations may make it possible for you to make a table based layout, but does that mean they promote this practice?

No.

Do they discourage them?

Yes actually, they do. See this document: http://www.w3.org/TR/WCAG10/#gl-table-markup

Does this make the W3C a bunch of elitist too?

The recommendations loosely cover what the provided elements are designed to be used for. Tables are just that. A table is not a template. It is a means to mark-up tabular data; as such it has its uses but should not be used to encapsulate the layout and visual presentation of an entire document.

Furthermore, just because it's not in widespread use doesn't mean it's not useful. The fact of that matter is that most websites are in HTML, the majority of which don't follow the recommendations set out by the W3C. I'd suspect this is because they don't know any better, having not actually read up on the technology they are using. This is just as bad as any excuse for not using them correctly.

quote:
An extra DIV will not destroy a page, nor will it make the load time balloon, nor will it look any different in any browser. You're blowing things way out of proportion. "Oh no! He used an extra DIV! I'm never going back to that site ever again! He's not following web standards!111"



Dude, this discussion stopped being about just one <div> element when you started saying that using tables were an acceptable way to display websites. At which point I thought we moved onto a discussion about web standards and best practices.

[This message has been edited by Cameron (edited 02-26-2004).]

Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

IP logged posted posted 03-05-2004 18:27 Edit Quote

Uhhh... wow, good discussion guys!
Cameron, that fix worked out perfect.

quote:
Just quickly.... Dang Karl, what'd ya do to my design! If you can, try and use use the template I provided for the main website.



It is a version of your template for an email that we send out to our leads.

Karl

JKMabry
Maniac (V) Inmate

From: out of a sleepy funk
Insane since: Aug 2000

IP logged posted posted 03-05-2004 23:40 Edit Quote

make sure you specify a background-color : white before you send it out



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu