going beyond a couple of <br />'s

This is a discussion on "going beyond a couple of <br />'s" within the Web Page Design section. This forum, and the thread "going beyond a couple of <br />'s are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 23rd, 2007, 11:27
Up'n'Coming Member
Join Date: May 2007
Location: northern nsw, au
Age: 27
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
going beyond a couple of <br />'s

I'm still getting my head around css and am wondering how to place a DIV of a certain width, that whatever height it takes up it doesn't have anything on a certain side, or either side of...

My hack is generally something like:
Code: Select all
<div style="float: left; clear: right; margin-left: 18px; font-size: 9pt; width: 300px;">Enter a numerical value such as 9px or 2em to add more margin between the primary image and copy. Negative numerals such as -9px or -2em will decrease the margin.</div><br /><br /><br />
// enter here stuff that goes under the br'd div
have i misunderstood the css 'clear' usage? keep clear everything right of this is my understanding... looking to the web consortium now! any tips though?

  #2 (permalink)  
Old May 23rd, 2007, 11:32
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: going beyond a couple of <br />'s

Code: Select all
.box {
  width: 300px;
  margin: 0 auto;
}
Code: Select all
<div class="box"></div>
  #3 (permalink)  
Old May 23rd, 2007, 12:26
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: going beyond a couple of <br />'s

To add to what Ryan posted, if you want to clear a space "beneath" the box, then add margin-bottom:

Code: Select all
.box {
  width: 300px;
  margin: 0 auto;
  margin-bottom: 10px;
}
Code: Select all
<div class="box"></div>
BTW, the margin: auto; will center your box.
  #4 (permalink)  
Old May 23rd, 2007, 14:26
Up'n'Coming Member
Join Date: May 2007
Location: northern nsw, au
Age: 27
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Re: going beyond a couple of <br />'s

ahh the margin auto eh...

auto has actually only just become an ingredient in my recipe book. i use margin as much as any other tool and only in the last week have i seen auto used to center.

imo, up until recently, centering has been a real hassle.

/bows down on his knees

thank you for the teaching
  #5 (permalink)  
Old May 23rd, 2007, 17:50
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,646
Thanks: 0
Thanked 7 Times in 7 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: going beyond a couple of <br />'s

to correct:

.box {
width: 300px;
margin: 0 auto 10px auto; /* top, right, bottom, left */
}
__________________
I've got <style> and .class
  #6 (permalink)  
Old May 24th, 2007, 00:25
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: going beyond a couple of <br />'s

I must've been in a hurry. Moojoo's could also be written as margin: 0 auto 10px; for the same effect. Shorthand is nice.
  #7 (permalink)  
Old May 24th, 2007, 07:15
Up'n'Coming Member
Join Date: May 2007
Location: northern nsw, au
Age: 27
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Re: going beyond a couple of <br />'s

top right bottom left top right bottom left top right bottom left

thanks for the tips. i like the shorthand
  #8 (permalink)  
Old May 24th, 2007, 10:51
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: going beyond a couple of <br />'s

For not shorthand, just think of it as North East South West
  #9 (permalink)  
Old May 24th, 2007, 11:09
Up'n'Coming Member
Join Date: May 2007
Location: northern nsw, au
Age: 27
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Re: going beyond a couple of <br />'s

and to remember North East South West try Never Eat Soggy Wheatbix which may not work unless you are australian and know what Wheatbix are.
  #10 (permalink)  
Old May 24th, 2007, 11:27
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: going beyond a couple of <br />'s

In the US it's Never Eat Soggy Wheat, so it's basically the same thing. What are Wheatbix?
  #11 (permalink)  
Old May 24th, 2007, 12:55
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: going beyond a couple of <br />'s

Or just TRouBLed

Top
Right
Bottom
Left

  #12 (permalink)  
Old May 24th, 2007, 13:10
Up'n'Coming Member
Join Date: May 2007
Location: northern nsw, au
Age: 27
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Re: going beyond a couple of <br />'s

hahaha thats cool.

took me a while to work out what you were on about but you went back to the Top Right Bottom Left thing.

wheat bix are like wheat bricks. 1cm x 3cm x 6cm. You get a whole bunch stacked in a box and you slam a few in the bowl and pour the milk.

is your wheat not bix?
  #13 (permalink)  
Old May 24th, 2007, 17:43
VanessaJW's Avatar
SuperMember

SuperMember
Join Date: Apr 2007
Location: Kent, England
Age: 37
Posts: 560
Thanks: 0
Thanked 0 Times in 0 Posts
Re: going beyond a couple of <br />'s

In England we say Never Eat Shredded Wheat (which I think works in the US, Canada and Australia too?). We do also have the Wheatbix that you referred to, only we call them Weetabix, and that's right, you shouldn't eat them soggy, yuck!
  #14 (permalink)  
Old May 24th, 2007, 19:15
Junior Member
Join Date: May 2007
Location: NW, UK
Age: 18
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to christoefar
Re: going beyond a couple of <br />'s

You can also use Naughty Elephants Squirt Water!

And I happen to like my weetabix soggy, with lots of sugar, possibly warm milk!
  #15 (permalink)  
Old May 24th, 2007, 19:55
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,646
Thanks: 0
Thanked 7 Times in 7 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: going beyond a couple of <br />'s

I like to think of it like a clock. 12, 3, 6, 9. Works for me anyway. but I think in images, bleh probably why I suck so bad at math.

As for going off topic I only have one pearl of wisdom to share.

Never date a woman who has more children than teeth.
__________________
I've got <style> and .class
  #16 (permalink)  
Old May 25th, 2007, 13:08
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: going beyond a couple of <br />'s

Closing thread. If you have something on-topic to add, PM me. I re-open it.
Closed Thread

Tags
br replacement

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
a couple of problems ukstoner Web Page Design 1 Apr 29th, 2008 13:45
A couple of issues I need help with please Johnathan Web Page Design 7 Mar 15th, 2008 17:57
CSS Help, A couple things. Dazer Web Page Design 5 Mar 8th, 2007 16:26
A couple of bugs Ryan Fait Web Page Design 6 Jan 12th, 2007 23:32
A couple of articles Ryan Fait Web Page Design 2 Oct 20th, 2006 07:57


All times are GMT. The time now is 12:54.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43