Welcome to WebmasterWorld Guest from 54.227.1.130

Forum Moderators: not2easy

Message Too Old, No Replies

INLINE DIVs and Width Attribute - tearing my hair out

     

Tyguy7

6:14 pm on Nov 25, 2008 (gmt 0)

5+ Year Member



I can't believe this is true, but everything I try fails. I'm at my wits end and I can't believe that CSS would be designed this way.

Is it at all possible to have an inline DIV or SPAN that has a set width? I've been working on this for over a week and I want to kill myself. It seems like something everyone would want, and I need it about a dozen times on my site.

I have a DIV, width set 700.
Within that div I have 4 INLINE divs, one with a set width.

the set width doesn't apply when I have it set as an inline DIV. The second I set it to block, it widens up and adds line breaks. I need NO line breaks and a set width.

This also applies to inline-block too. Please help me I feel like crying or smashing my computer.

garann

10:06 pm on Nov 25, 2008 (gmt 0)

10+ Year Member



Can you float the element that needs the fixed width? My info may be dated, but I don't think inline-block - which is exactly what you want, in theory - is well supported in all browsers. Floating the object gets you close, though.

swa66

11:11 pm on Nov 25, 2008 (gmt 0)

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com]!

Before you damage your computer or your scalp, what browser are you using ?

Inline isn't -to my knowledge- supposed to support width, think of it as text.

In some browsers "inline-block" needs TLC before it functions. See SuzyUKs post on the subject:
[webmasterworld.com...]

HTH

 

Featured Threads

Hot Threads This Week

Hot Threads This Month