Hello

Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: anyone here fluent in css web design?  (Read 1704 times)

Offline Cerberus

  • I\'ve got 3 heads!
  • Legendary Member
  • ******
  • Posts: 4887
  • Karma: +10/-0
  • ffffffffff
    • Random Stuff.
  • PSN ID: Surebrec
anyone here fluent in css web design?
« on: January 29, 2010, 04:27:29 PM »
I\'m trying to fix a problem I\'m having.





when aligning the image to the right or left of the content box it is contained in, and there is not enough text to wrap around the image, the content box cuts behind the image in question.

is there any way of sorting it so that no matter how little text there is, the content box will fully enclose the image?

this is the css & html I am using for the parts on the screenshot

css & html code

anyone any ideas how to fix this?
Don't waste your words I don't need anything from you. I don't care where you've  been or what you plan to do. I am the resurrection and I am the light. I  couldn't ever bring myself to hate you as I'd like.

Offline THX
  • nigstick
  • Legendary Member
  • ******
  • Posts: 8158
  • Karma: +10/-0
anyone here fluent in css web design?
« Reply #1 on: January 29, 2010, 04:32:23 PM »
The image is either floated right or aligned right.  The container needs to be clearfixed or simply add this before the closing div on the container:


< br clear="all" />


Should work, but if you want it to W3C validate you can use the former method.

\"i thought america alreay had been in the usa??? i know it was in australia and stuff.\"
-koppy *MEMBER KOPKING FANCLUB*
\"I thought japaneses where less idiot than americans....\" -Adan
\"When we can press a button to transport our poops from our colon to the toilet, I\'ll be impressed.\" -Gman

Offline THX
  • nigstick
  • Legendary Member
  • ******
  • Posts: 8158
  • Karma: +10/-0
anyone here fluent in css web design?
« Reply #2 on: January 29, 2010, 04:36:09 PM »
Examined your code that you linked up..

Lorem
  ipsum dolor sit amet, consectetur adipiscing elit. Quisque et diam eget turpis
  consectetur iaculis. Curabitur laoreet tortor eu est semper et accumsan ante
  sodales. Quisque suscipit, nulla sit amet tristique egestas, neque urna sollicitudin
  purus, at auctor sapien mi quis magna. Proin pellentesque felis ac purus fermentum
  at mollis tellus placerat. Sed ornare, urna eu pretium venenatis, felis nisi
  varius nunc, sed aliquet nibh risus quis lacus. Nam fringilla ornare ligula
  et lobortis. Aliquam fermentum viverra sapien sit amet posuere.





or

Lorem
  ipsum dolor sit amet, consectetur adipiscing elit. Quisque et diam eget turpis
  consectetur iaculis. Curabitur laoreet tortor eu est semper et accumsan ante
  sodales. Quisque suscipit, nulla sit amet tristique egestas, neque urna sollicitudin
  purus, at auctor sapien mi quis magna. Proin pellentesque felis ac purus fermentum
  at mollis tellus placerat. Sed ornare, urna eu pretium venenatis, felis nisi
  varius nunc, sed aliquet nibh risus quis lacus. Nam fringilla ornare ligula
  et lobortis. Aliquam fermentum viverra sapien sit amet posuere.

...and add the CSS here to your stylesheet

\"i thought america alreay had been in the usa??? i know it was in australia and stuff.\"
-koppy *MEMBER KOPKING FANCLUB*
\"I thought japaneses where less idiot than americans....\" -Adan
\"When we can press a button to transport our poops from our colon to the toilet, I\'ll be impressed.\" -Gman

Offline Cerberus

  • I\'ve got 3 heads!
  • Legendary Member
  • ******
  • Posts: 4887
  • Karma: +10/-0
  • ffffffffff
    • Random Stuff.
  • PSN ID: Surebrec
anyone here fluent in css web design?
« Reply #3 on: January 29, 2010, 04:54:26 PM »
Quote from: THX
Examined your code that you linked up..

 [IMG]http://www.psx2central.com/forums/images/testpic1.jpg[/IMG]Lorem
  ipsum dolor sit amet, consectetur adipiscing elit. Quisque et diam eget turpis
  consectetur iaculis. Curabitur laoreet tortor eu est semper et accumsan ante
  sodales. Quisque suscipit, nulla sit amet tristique egestas, neque urna sollicitudin
  purus, at auctor sapien mi quis magna. Proin pellentesque felis ac purus fermentum
  at mollis tellus placerat. Sed ornare, urna eu pretium venenatis, felis nisi
  varius nunc, sed aliquet nibh risus quis lacus. Nam fringilla ornare ligula
  et lobortis. Aliquam fermentum viverra sapien sit amet posuere.




 
or

 [IMG]http://www.psx2central.com/forums/images/testpic1.jpg[/IMG]Lorem
  ipsum dolor sit amet, consectetur adipiscing elit. Quisque et diam eget turpis
  consectetur iaculis. Curabitur laoreet tortor eu est semper et accumsan ante
  sodales. Quisque suscipit, nulla sit amet tristique egestas, neque urna sollicitudin
  purus, at auctor sapien mi quis magna. Proin pellentesque felis ac purus fermentum
  at mollis tellus placerat. Sed ornare, urna eu pretium venenatis, felis nisi
  varius nunc, sed aliquet nibh risus quis lacus. Nam fringilla ornare ligula
  et lobortis. Aliquam fermentum viverra sapien sit amet posuere.
 
...and add the CSS here to your stylesheet

thanks, that appears to work almost perfectly. it seems to narrow the contentshell box slightly in IE, but in firefox it\'s spot on.
Don't waste your words I don't need anything from you. I don't care where you've  been or what you plan to do. I am the resurrection and I am the light. I  couldn't ever bring myself to hate you as I'd like.

Offline Eiksirf
  • **E!
  • Legendary Member
  • ******
  • Posts: 4398
  • Karma: +10/-0
anyone here fluent in css web design?
« Reply #4 on: February 02, 2010, 10:41:36 AM »
Pretty cool. Can you do a pic of the fixed page?
\"What are you supposed to be, a clown or something?\"
\"Sometimes.\"
 
http://videogamer.today.com

Offline Cerberus

  • I\'ve got 3 heads!
  • Legendary Member
  • ******
  • Posts: 4887
  • Karma: +10/-0
  • ffffffffff
    • Random Stuff.
  • PSN ID: Surebrec
anyone here fluent in css web design?
« Reply #5 on: February 02, 2010, 01:33:49 PM »
Quote from: Eiksirf
Pretty cool. Can you do a pic of the fixed page?

yeah

http://surebrec.pwp.blueyonder.co.uk/test/

nothing special really, just basic stuff.
Don't waste your words I don't need anything from you. I don't care where you've  been or what you plan to do. I am the resurrection and I am the light. I  couldn't ever bring myself to hate you as I'd like.

Offline Phil
  • Legendary Member
  • ******
  • Posts: 2605
  • Karma: +10/-0
  • PSN ID: Slab_Serif
anyone here fluent in css web design?
« Reply #6 on: February 02, 2010, 02:04:31 PM »
Is that a marquee tag I see????

Oh you poor poor bastard.
« Last Edit: February 02, 2010, 02:05:41 PM by Phil »
Wrong. There are two other people who can.
Dark Lord Sith\'s.
Demon\'s named Phil.  -LIC

Offline Cerberus

  • I\'ve got 3 heads!
  • Legendary Member
  • ******
  • Posts: 4887
  • Karma: +10/-0
  • ffffffffff
    • Random Stuff.
  • PSN ID: Surebrec
anyone here fluent in css web design?
« Reply #7 on: February 02, 2010, 03:15:13 PM »
thanks.

I know marquees are old hat, but considering I\'m just tinkering around to pass the time, who gives a flying fuck? should I ever decide to actually use this layout for anything, do you honestly think I\'d use a marquee????

I\'m well aware that there are other alternatives, but to get an idea of an effect, sometimes it\'s best to go the low tech route before wasting time with javascript or other methods.
Don't waste your words I don't need anything from you. I don't care where you've  been or what you plan to do. I am the resurrection and I am the light. I  couldn't ever bring myself to hate you as I'd like.

Offline videoholic

  • Silly little freak
  • Legendary Member
  • ******
  • Posts: 18034
  • Karma: +10/-0
anyone here fluent in css web design?
« Reply #8 on: February 02, 2010, 03:29:02 PM »
What\'s wrong with a Marquee?  I have more of an issue with Latin being a dead language.  ;)
I wear a necklace now because I like to know when I\'m upside down.
 kopking: \"i really think that i how that guy os on he weekend\"
TheOmen speaking of women: \"they\'re good at what they do, for what they are.\"
Swifdi:

Offline Eiksirf
  • **E!
  • Legendary Member
  • ******
  • Posts: 4398
  • Karma: +10/-0
anyone here fluent in css web design?
« Reply #9 on: February 03, 2010, 10:50:15 AM »
Yeah I like it, the marquee caught my eye. It\'s probably ok because the rest of the design is so clean.

Also, Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam consectetur pulvinar lorem, sit amet luctus metus bibendum non. Nam pretium lacinia erat, a viverra magna aliquam vitae. Morbi quis libero nec tellus gravida consequat. Nullam dignissim, arcu aliquam faucibus aliquam, ipsum nunc accumsan sapien, nec rhoncus massa metus non felis. Fusce sapien enim, pulvinar a facilisis vitae, interdum nec libero. Praesent ut neque sapien, at euismod ipsum. Pellentesque dictum rutrum elit, at tempus nunc tristique ac. Vivamus eu sollicitudin ligula. Sed eu velit nunc.
\"What are you supposed to be, a clown or something?\"
\"Sometimes.\"
 
http://videogamer.today.com

Offline Cerberus

  • I\'ve got 3 heads!
  • Legendary Member
  • ******
  • Posts: 4887
  • Karma: +10/-0
  • ffffffffff
    • Random Stuff.
  • PSN ID: Surebrec
anyone here fluent in css web design?
« Reply #10 on: February 05, 2010, 07:33:31 AM »
ok, another question, how do I vertically align text within a div?




the white text is where the text appears when I enter it, the grey text is where I want it to be.

I\'ve tried creating a custom class and setting the vertical alignment to text-bottom, but it doesn\'t seem to fix it. I also tried styling the h1 tag to do it, but that didn\'t work either.

this is the css & html:

#banner {
    height: 120px;
    padding: 0.5em;
    background-color: #000000;
    background-image: url(../images/banner.jpg);
    background-repeat: no-repeat;
    background-position: left bottom;
}
h1 {
    font-family: "Times New Roman", Times, serif;
    font-size: 36px;
    vertical-align: bottom;
    color: #FFFFFF;
    font-style: italic;
    text-transform: capitalize;
    text-align: right;
}
 
 
     

     

this is some random text


 


 
Don't waste your words I don't need anything from you. I don't care where you've  been or what you plan to do. I am the resurrection and I am the light. I  couldn't ever bring myself to hate you as I'd like.

Offline THX
  • nigstick
  • Legendary Member
  • ******
  • Posts: 8158
  • Karma: +10/-0
anyone here fluent in css web design?
« Reply #11 on: February 06, 2010, 08:26:16 AM »
If the DIV will always be changing height it will take the line-height "trick" as CSS2 has no proper way to handle vertical-aligning with text and containers with dynamic heights.

If the DIV is a static height (which it looks like it is) just do some absolute positioning, add these classes to your current stylesheet:

#banner { position:relative; }

#banner h1 { position:absolute; top:15px; right:20px; }

(remove all the text-align and vertical-align classes)

\"i thought america alreay had been in the usa??? i know it was in australia and stuff.\"
-koppy *MEMBER KOPKING FANCLUB*
\"I thought japaneses where less idiot than americans....\" -Adan
\"When we can press a button to transport our poops from our colon to the toilet, I\'ll be impressed.\" -Gman

 

SMF spam blocked by CleanTalk