Jump to content

I got a problem...

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
Howdy_McGee

Howdy_McGee

    Programmer

  • Members
  • PipPipPipPip
  • 135 posts
I've been looking a this code for a week now and I can't figure it out for the life of me, maybe someone here can help me.

What would cause a div tag not to take a inline width style? I put a inline style of 100px into this div tag but when I put text into it, the text keeps going and going outside of my container tag and everything.

When I check it in chrome (inspect element) it says that it's taking the style of 100px, I cant figure it out for the life of me.

Anyone have any suggestions?

#2
Howdy_McGee

Howdy_McGee

    Programmer

  • Members
  • PipPipPipPip
  • 135 posts
Actually, kinda solved the problem, but didn't answer my question. The div/p tags would apply the width if I put text w/ spaces (i.e. dummy text Loreum Ipsum) but if I make just a long line of jumbled text, it wouldn't apply the width but instead would keep going and going and going.

Anyone know why that is?

:D I have lots of questions w/o answers

#3
NastyDevil

NastyDevil

    Learning Programmer

  • Members
  • PipPipPip
  • 90 posts
Because it can't figure out where to break the long line of text you wrote. There is a way to just cut the text and break it down by width using PHP (only method i can think of from the top of my head) but usually you don't have the problem of having no spaces in what you write. As far as I know it is like that by design and in html specifically there is no way to overcome that. Il give it a deeper look tho and let you know if i find any solution.

#4
Howdy_McGee

Howdy_McGee

    Programmer

  • Members
  • PipPipPipPip
  • 135 posts
Well I would figure even without spaces, if what ever the content is exceeds whatever width I put said Div element at, it would drop anything after the width to the next line and repeat.