5 replies [Last post]
pinehead18
Offline
Regular
Last seen: 13 years 20 weeks ago
Joined: 2007-05-30
Posts: 11
Points: 0

#loginbox { position: relative; float: left; width: 270px; maring: 10px 0px; border: 1px solid black; height: 10%;

}

h1 {

text-align: left;
border: 1px solid black;
vertical-align: top;
clear: both;

}

horray

Now this work,s however the <h1> is not at the very top of the box like its a top bar. there is the box then there is a space then the top line on the loginbox border.

Suggestions?

Thanks

SuperRoach
SuperRoach's picture
Offline
Enthusiast
Ballarat
Last seen: 9 years 7 weeks ago
Ballarat
Timezone: GMT+10
Joined: 2007-02-26
Posts: 291
Points: 6

Lol, I think I asked a

Lol, I think I asked a similar question not long ago!
I havn't been able to find a solution so far, even including a messy div containing the h1 didn't work.... so it appears its something fundamental we are both missing.

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 6 years 1 week ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Your explanation's not very

Your explanation's not very clear, but have you tried zeroing the margins on the h1?

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

pinehead18
Offline
Regular
Last seen: 13 years 20 weeks ago
Joined: 2007-05-30
Posts: 11
Points: 0

zeroing the margins works

zeroing the margins works great thanks!

pinehead18
Offline
Regular
Last seen: 13 years 20 weeks ago
Joined: 2007-05-30
Posts: 11
Points: 0

Question though

Question though
Can i not change h1 to title
and instead of doing <h1> do <title> cause it did not work for sure Smile

SuperRoach
SuperRoach's picture
Offline
Enthusiast
Ballarat
Last seen: 9 years 7 weeks ago
Ballarat
Timezone: GMT+10
Joined: 2007-02-26
Posts: 291
Points: 6

I didn't understand your

I didn't understand your english too well sorry...

You can't do much (and shouldn't) to the title tag, because browsers read it for a title in the top bar... You can't change the format of it up there, so css would be meaningless. Title isn't typically something visible, neither

Styling the h1 .... h2 etc tags is a really great way to work, order your content in importance, then style them as needed. That way, if theres no css, it still comes out reasonably well