homepage Welcome to WebmasterWorld Guest from 184.72.69.79
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
INLINE DIVs and Width Attribute - tearing my hair out
Tyguy7




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

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




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

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




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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved